PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0-beta3
Elementor Website Builder – more than just a page builder v4.3.0-beta3
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 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | modules/promotions/module.php +9 -20 4.1.54.3.0-beta3 View file →
@@ -17,10 +17,10 @@
17 17 use Elementor\Modules\Promotions\Conversion_Banner;
18 18 use Elementor\Modules\Promotions\Pointers\Birthday;
19 19 use Elementor\Modules\Promotions\Pointers\Black_Friday;
20 20 use Elementor\Modules\Promotions\PropTypes\Promotion_Prop_Type;
21 -use Elementor\Modules\Promotions\Widgets\Ally_Dashboard_Widget;
22 21 use Elementor\Modules\Promotions\Widgets\Atomic_Form_Widget_Promotion;
22 +use Elementor\Modules\Promotions\Widgets\Collection_Loop_Widget_Promotion;
23 23 use Elementor\Widgets_Manager;
24 24 use Elementor\Utils;
25 25 use Elementor\Includes\EditorAssetsAPI;
26 26 use Elementor\Plugin;
@@ -85,10 +85,14 @@
85 85 if ( Black_Friday::should_display_notice() ) {
86 86 new Black_Friday();
87 87 }
88 88
89 - if ( Conversion_Banner::should_display_banner() ) {
90 - new Conversion_Banner();
89 + if ( ! Utils::has_pro() ) {
90 + Conversion_Banner::register_cache_invalidation_hooks();
91 +
92 + if ( Conversion_Banner::should_display_banner() ) {
93 + new Conversion_Banner();
94 + }
91 95 }
92 96
93 97 add_filter( 'elementor/editor/localize_settings', [ $this, 'add_editing_panel_sticky_promotion' ] );
94 98
@@ -98,23 +102,11 @@
98 102
99 103 add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_react_data' ] );
100 104 add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_editor_v4_alphachip' ] );
101 105
102 - // Add Ally promo
103 - Ally_Dashboard_Widget::init();
104 -
105 106 $this->register_atomic_promotions();
106 107 }
107 108
108 - /**
109 - * Get Ally Scanner URL
110 - *
111 - * @return string
112 - */
113 - public static function get_ally_external_scanner_url(): string {
114 - return apply_filters( 'elementor/ally_external_scanner_url', 'https://go.elementor.com/acc-checker-dashboard-plg' );
115 - }
116 -
117 109 private function handle_external_redirects() {
118 110 $page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
119 111 if ( empty( $page ) ) {
120 112 return;
@@ -119,9 +111,9 @@
119 111 if ( empty( $page ) ) {
120 112 return;
121 113 }
122 114
123 - if ( 'go_elementor_pro' === $page ) {
115 + if ( in_array( $page, [ 'go_elementor_pro', 'elementor-one-upgrade' ], true ) ) {
124 116 wp_redirect( Go_Pro_Promotion_Item::get_url() ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
125 117 die;
126 118 }
127 119 }
@@ -222,12 +214,8 @@
222 214 ];
223 215 }
224 216
225 217 public function add_editing_panel_sticky_promotion( array $settings ): array {
226 - if ( ! Plugin::$instance->experiments->is_feature_active( 'e_panel_promotions' ) ) {
227 - return $settings;
228 - }
229 -
230 218 $settings['editingPanelStickyPromotion'] = Filtered_Promotions_Manager::get_editor_panel_sticky_promotion();
231 219
232 220 return $settings;
233 221 }
@@ -295,8 +283,9 @@
295 283 }
296 284 } );
297 285
298 286 ( new Atomic_Form_Widget_Promotion() )->register();
287 + ( new Collection_Loop_Widget_Promotion() )->register();
299 288 }
300 289
301 290 public function inject_atomic_promotion_props( array $schema ): array {
302 291 foreach ( $this->get_atomic_promotion_configs() as $config ) {