| @@ -17,9 +17,8 @@ | ||
| 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; |
| 23 | 22 | use Elementor\Modules\Promotions\Widgets\Collection_Loop_Widget_Promotion; |
| 24 | 23 | use Elementor\Widgets_Manager; |
| 25 | 24 | use Elementor\Utils; |
| @@ -86,10 +85,14 @@ | ||
| 86 | 85 | if ( Black_Friday::should_display_notice() ) { |
| 87 | 86 | new Black_Friday(); |
| 88 | 87 | } |
| 89 | 88 | |
| 90 | - if ( Conversion_Banner::should_display_banner() ) { | |
| 91 | - 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 | + } | |
| 92 | 95 | } |
| 93 | 96 | |
| 94 | 97 | add_filter( 'elementor/editor/localize_settings', [ $this, 'add_editing_panel_sticky_promotion' ] ); |
| 95 | 98 | |
| @@ -99,23 +102,11 @@ | ||
| 99 | 102 | |
| 100 | 103 | add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_react_data' ] ); |
| 101 | 104 | add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_editor_v4_alphachip' ] ); |
| 102 | 105 | |
| 103 | - // Add Ally promo | |
| 104 | - Ally_Dashboard_Widget::init(); | |
| 105 | - | |
| 106 | 106 | $this->register_atomic_promotions(); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - /** | |
| 110 | - * Get Ally Scanner URL | |
| 111 | - * | |
| 112 | - * @return string | |
| 113 | - */ | |
| 114 | - public static function get_ally_external_scanner_url(): string { | |
| 115 | - return apply_filters( 'elementor/ally_external_scanner_url', 'https://go.elementor.com/acc-checker-dashboard-plg' ); | |
| 116 | - } | |
| 117 | - | |
| 118 | 109 | private function handle_external_redirects() { |
| 119 | 110 | $page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); |
| 120 | 111 | if ( empty( $page ) ) { |
| 121 | 112 | return; |
| @@ -223,12 +214,8 @@ | ||
| 223 | 214 | ]; |
| 224 | 215 | } |
| 225 | 216 | |
| 226 | 217 | public function add_editing_panel_sticky_promotion( array $settings ): array { |
| 227 | - if ( ! Plugin::$instance->experiments->is_feature_active( 'e_panel_promotions' ) ) { | |
| 228 | - return $settings; | |
| 229 | - } | |
| 230 | - | |
| 231 | 218 | $settings['editingPanelStickyPromotion'] = Filtered_Promotions_Manager::get_editor_panel_sticky_promotion(); |
| 232 | 219 | |
| 233 | 220 | return $settings; |
| 234 | 221 | } |