| @@ -37,9 +37,13 @@ | ||
| 37 | 37 | |
| 38 | 38 | const ADMIN_MENU_PROMOTIONS_PRIORITY = 120; |
| 39 | 39 | |
| 40 | 40 | public static function is_active() { |
| 41 | - return ! Utils::has_pro() || ! Utils::is_license_active(); | |
| 41 | + if ( Utils::has_pro() ) { | |
| 42 | + return true; | |
| 43 | + } | |
| 44 | + | |
| 45 | + return ! Utils::is_license_active(); | |
| 42 | 46 | } |
| 43 | 47 | |
| 44 | 48 | public function get_name() { |
| 45 | 49 | return 'promotions'; |
| @@ -261,9 +265,19 @@ | ||
| 261 | 265 | ], |
| 262 | 266 | ]; |
| 263 | 267 | } |
| 264 | 268 | |
| 269 | + private function should_register_core_atomic_panel_promotions(): bool { | |
| 270 | + // Pro with an active license registers real atomic widgets (or its own panel | |
| 271 | + // promotion layer). Core stubs caused duplicate panel entries after ED-25600. | |
| 272 | + return ! Utils::has_pro() || ! Utils::is_license_active(); | |
| 273 | + } | |
| 274 | + | |
| 265 | 275 | private function register_atomic_promotions(): void { |
| 276 | + if ( ! $this->should_register_core_atomic_panel_promotions() ) { | |
| 277 | + return; | |
| 278 | + } | |
| 279 | + | |
| 266 | 280 | add_action( 'elementor/init', function() { |
| 267 | 281 | if ( ! $this->is_atomic_widgets_active() ) { |
| 268 | 282 | return; |
| 269 | 283 | } |