PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.3
Elementor Website Builder – more than just a page builder v4.3.3
4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 All 456 releases
← All changes | modules/promotions/module.php +21 -3 4.3.0-beta2 → 4.3.3 View file →
@@ -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';
@@ -85,10 +89,14 @@
85 89 if ( Black_Friday::should_display_notice() ) {
86 90 new Black_Friday();
87 91 }
88 92
89 - if ( Conversion_Banner::should_display_banner() ) {
90 - new Conversion_Banner();
93 + if ( ! Utils::has_pro() ) {
94 + Conversion_Banner::register_cache_invalidation_hooks();
95 +
96 + if ( Conversion_Banner::should_display_banner() ) {
97 + new Conversion_Banner();
98 + }
91 99 }
92 100
93 101 add_filter( 'elementor/editor/localize_settings', [ $this, 'add_editing_panel_sticky_promotion' ] );
94 102
@@ -257,9 +265,19 @@
257 265 ],
258 266 ];
259 267 }
260 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 +
261 275 private function register_atomic_promotions(): void {
276 + if ( ! $this->should_register_core_atomic_panel_promotions() ) {
277 + return;
278 + }
279 +
262 280 add_action( 'elementor/init', function() {
263 281 if ( ! $this->is_atomic_widgets_active() ) {
264 282 return;
265 283 }