| @@ -13,9 +13,8 @@ | ||
| 13 | 13 | use ShopEngine\Libs\License\License_Route; |
| 14 | 14 | use ShopEngine\Libs\Rating\Rating; |
| 15 | 15 | use ShopEngine\Libs\Updater\Init as Updater; |
| 16 | 16 | use ShopEngine\Modules\Manifest as Module_Manifest; |
| 17 | -use ShopEngine\Utils\Feedback\Plugin_Unsubscribe; | |
| 18 | 17 | use ShopEngine\Widgets\Manifest; |
| 19 | 18 | |
| 20 | 19 | |
| 21 | 20 | /** |
| @@ -85,10 +84,8 @@ | ||
| 85 | 84 | |
| 86 | 85 | if($error) { |
| 87 | 86 | return; |
| 88 | 87 | } |
| 89 | - | |
| 90 | - | |
| 91 | 88 | |
| 92 | 89 | add_filter("plugin_action_links_shopengine/shopengine.php", function ($links) { |
| 93 | 90 | $free = esc_html__("Go To Shopengine","shopengine"); |
| 94 | 91 | $pro = esc_html__("Go To ShopenginePro","shopengine"); |
| @@ -104,27 +101,15 @@ | ||
| 104 | 101 | } |
| 105 | 102 | return $links; |
| 106 | 103 | }); |
| 107 | 104 | |
| 108 | - if(\ShopEngine\Utils\Util::get_settings( 'shopengine_user_consent_for_banner', 'true' ) == 'true'){ | |
| 109 | - | |
| 110 | - /** | |
| 111 | - * EmailKit Global Class initialization | |
| 112 | - * | |
| 113 | - */ | |
| 114 | - if( !class_exists('EmailKit') && !did_action('edit_with_emailkit_loaded') && class_exists('\Wpmet\Libs\Emailkit') ) { | |
| 115 | - | |
| 116 | - new \Wpmet\Libs\Emailkit(); | |
| 117 | - } | |
| 118 | - | |
| 119 | - /** | |
| 120 | - * MetForm get free templates promotional class initialization | |
| 121 | - * | |
| 122 | - */ | |
| 123 | - if( !did_action('metform/after_load') && did_action('elementor/loaded') && class_exists('\Wpmet\Libs\Metform_Promo_Banner') ) { | |
| 124 | - | |
| 125 | - new \Wpmet\Libs\Metform_Promo_Banner(); | |
| 126 | - } | |
| 105 | + /** | |
| 106 | + * EmailKit Global Class initialization | |
| 107 | + * | |
| 108 | + */ | |
| 109 | + if( !class_exists('EmailKit') && !did_action('edit_with_emailkit_loaded') && class_exists('\Wpmet\Libs\Emailkit') && \ShopEngine\Utils\Util::get_settings( 'shopengine_user_consent_for_banner', 'true' ) == 'true' ) { | |
| 110 | + | |
| 111 | + new \Wpmet\Libs\Emailkit(); | |
| 127 | 112 | } |
| 128 | 113 | |
| 129 | 114 | |
| 130 | 115 | /** |
| @@ -131,11 +116,9 @@ | ||
| 131 | 116 | * Routes initialization |
| 132 | 117 | * |
| 133 | 118 | */ |
| 134 | 119 | new License_Route(); |
| 135 | - | |
| 136 | - // Initialize deactivation feedback modal | |
| 137 | - new \ShopEngine\Utils\Feedback\Plugin_Unsubscribe(); | |
| 120 | + | |
| 138 | 121 | /** |
| 139 | 122 | * Run pro plugin updater here.... |
| 140 | 123 | * |
| 141 | 124 | */ |
| @@ -154,11 +137,10 @@ | ||
| 154 | 137 | LangMigration::instance()->init(); |
| 155 | 138 | }); |
| 156 | 139 | |
| 157 | 140 | // avoid themes for loading woocommerce functions |
| 158 | - $avoid_themes = ['avada', 'woodmart', 'Avada', 'Woodmart']; | |
| 159 | - | |
| 160 | - if( !in_array(get_template(), $avoid_themes) ) { | |
| 141 | + $avoid_themes = ['avada', 'avada child', 'woodmart', 'woodmart child']; | |
| 142 | + if(!in_array(strtolower(wp_get_theme()), $avoid_themes)) { | |
| 161 | 143 | /** |
| 162 | 144 | * Ensuring woocommerce functions are loaded before theme is modifying those |
| 163 | 145 | * |
| 164 | 146 | */ |
| @@ -171,27 +153,11 @@ | ||
| 171 | 153 | new \ShopEngine\Core\Elementor_Controls\Init(); |
| 172 | 154 | |
| 173 | 155 | //Loading the scripts and styles |
| 174 | 156 | add_action('elementor/editor/after_enqueue_styles', [$this, 'js_css_elementor']); |
| 175 | - | |
| 176 | - // Register widgets immediately after elementor is loaded with higher priority | |
| 177 | - if(is_plugin_active('related-products-manager-woocommerce/related-products-manager-for-woocommerce.php')) { | |
| 178 | - | |
| 179 | - add_action('elementor/widgets/register', function() { | |
| 180 | - (new Manifest())->init(); | |
| 181 | - }, 5); // Priority 5 to load early | |
| 182 | - } | |
| 183 | - | |
| 184 | 157 | } |
| 185 | 158 | |
| 186 | - // Cart validation compatibility with WC Min Max Quantity plugin | |
| 187 | 159 | |
| 188 | - if ( function_exists( 'is_plugin_active' ) && is_plugin_active( 'woo-min-max-quantity-step-control-single/wcmmq.php' ) ) { | |
| 189 | - | |
| 190 | - add_filter( 'wcmmq_cart_validation_check', [ $this, 'shopengine_wcmmq_cart_validation_compat' ], 10, 2 ); | |
| 191 | - } | |
| 192 | - | |
| 193 | - | |
| 194 | 160 | //Loading public scripts and styles |
| 195 | 161 | add_action('wp_enqueue_scripts', [$this, 'js_css_public']); |
| 196 | 162 | |
| 197 | 163 | //woocommece theme support |
| @@ -213,9 +179,8 @@ | ||
| 213 | 179 | |
| 214 | 180 | |
| 215 | 181 | Rating::instance('shopengine') |
| 216 | 182 | ->set_plugin( 'ShopEngine', 'https://wpmet.com/wordpress.org/rating/shopengine' ) |
| 217 | - ->set_rating_url( 'https://wordpress.org/support/plugin/shopengine/reviews/#new-post' ) | |
| 218 | 183 | ->set_plugin_logo( 'https://ps.w.org/shopengine/assets/icon-256x256.gif?rev=2505061', 'width:150px !important' ) |
| 219 | 184 | ->set_priority( 11 ) |
| 220 | 185 | ->set_first_appear_day( 7 ) |
| 221 | 186 | ->set_condition( true ) |
| @@ -242,105 +207,94 @@ | ||
| 242 | 207 | ->set_plugin_screens('edit-shopengine-template') |
| 243 | 208 | ->call(); |
| 244 | 209 | } |
| 245 | 210 | |
| 246 | - add_action('init', function () { | |
| 247 | - $apps_img_path = \ShopEngine::plugin_url() . 'assets/images/apps-page/'; | |
| 248 | - /** | |
| 249 | - * Show our plugins menu for others wpmet plugins | |
| 250 | - */ | |
| 251 | - \ShopEngine\Wpmet\Libs\Plugins::instance()->init('shopengine') | |
| 252 | - ->set_parent_menu_slug('shopengine-settings') | |
| 253 | - ->set_submenu_name('Our Plugins') | |
| 254 | - ->set_section_title('Get More out of Your WooCommerce Website!') | |
| 255 | - ->set_section_description('Install other plugins from us and take your WooCommerce site to the next level for absolutely free!') | |
| 256 | - ->set_items_per_row(4) | |
| 257 | - ->set_plugins( | |
| 258 | - [ | |
| 259 | - 'elementskit-lite/elementskit-lite.php' => [ | |
| 260 | - 'name' => esc_html__('ElementsKit', 'shopengine'), | |
| 261 | - 'url' => 'https://wordpress.org/plugins/elementskit-lite/', | |
| 262 | - 'icon' => $apps_img_path. 'elementskit.gif', | |
| 263 | - 'desc' => esc_html__('All-in-one Elementor addon trusted by 1 Million+ users, makes your website builder process easier with ultimate freedom.', 'shopengine'), | |
| 264 | - 'docs' => 'https://wpmet.com/doc/elementskit/', | |
| 265 | - ], | |
| 266 | - 'gutenkit-blocks-addon/gutenkit-blocks-addon.php' => [ | |
| 267 | - 'name' => esc_html__('GutenKit', 'shopengine'), | |
| 268 | - 'url' => 'https://wordpress.org/plugins/gutenkit-blocks-addon/', | |
| 269 | - 'icon' => $apps_img_path. 'guten-kit.png', | |
| 270 | - 'desc' => esc_html__('Gutenberg blocks, patterns, and templates that extend the page-building experience using the WordPress block editor.', 'shopengine'), | |
| 271 | - 'docs' => 'https://wpmet.com/doc/gutenkit/', | |
| 272 | - ], | |
| 273 | - 'rox-dynamic-cpt-fields-engine/rox-dynamic-cpt-fields-engine.php' => [ | |
| 274 | - 'name' => esc_html__('Rox Dynamic CPT Fields', 'shopengine'), | |
| 275 | - 'url' => 'https://wordpress.org/plugins/rox-dynamic-cpt-fields-engine/', | |
| 276 | - 'icon' => 'https://ps.w.org/rox-dynamic-cpt-fields-engine/assets/icon-256x256.jpeg?rev=3538537', | |
| 277 | - 'desc' => esc_html__('Build custom post types, fields, taxonomies, and dynamic frontend layouts for WordPress, with zero coding and full AI-generated schema.', 'shopengine'), | |
| 278 | - 'docs' => 'https://wpmet.com/doc/rox-dynamic-cpt-fields-engine/', | |
| 279 | - ], | |
| 280 | - 'rox-appointment-booking/rox-appointment-booking.php' => [ | |
| 281 | - 'name' => esc_html__('Rox Appointment Booking', 'shopengine'), | |
| 282 | - 'url' => 'https://wordpress.org/plugins/rox-appointment-booking/', | |
| 283 | - 'icon' => 'https://ps.w.org/rox-appointment-booking/assets/icon-256x256.png?rev=3575641', | |
| 284 | - 'desc' => esc_html__('Manage bookings, agents, payments, and calendars from one dashboard! A complete appointment and scheduling solution for WordPress.', 'shopengine'), | |
| 285 | - 'docs' => 'https://wpmet.com/doc/rox-appointment-booking/', | |
| 286 | - ], | |
| 287 | - 'metform/metform.php' => [ | |
| 288 | - 'name' => esc_html__('MetForm', 'shopengine'), | |
| 289 | - 'url' => 'https://wordpress.org/plugins/metform/', | |
| 290 | - 'icon' => $apps_img_path. 'metform.png', | |
| 291 | - 'desc' => esc_html__('Drag & drop form builder for Elementor to create contact forms, multi-step forms, and more — smoother, faster, and better!', 'shopengine'), | |
| 292 | - 'docs' => 'https://wpmet.com/doc/metform/', | |
| 293 | - ], | |
| 294 | - 'popup-builder-block/popup-builder-block.php' => [ | |
| 295 | - 'name' => esc_html__('PopupKit', 'shopengine'), | |
| 296 | - 'url' => 'https://wordpress.org/plugins/popup-builder-block/', | |
| 297 | - 'icon' => 'https://ps.w.org/popup-builder-block/assets/icon-256x256.png?rev=3316844', | |
| 298 | - 'desc' => esc_html__('Design popups that convert, right in your WordPress dashboard.', 'shopengine'), | |
| 299 | - 'docs' => 'https://wpmet.com/doc/popupkit/', | |
| 300 | - ], | |
| 301 | - 'table-builder-block/table-builder-block.php' => [ | |
| 302 | - 'name' => esc_html__('TableKit', 'shopengine'), | |
| 303 | - 'url' => 'https://wordpress.org/plugins/table-builder-block/', | |
| 304 | - 'icon' => 'https://ps.w.org/table-builder-block/assets/icon-256x256.png?rev=3509972', | |
| 305 | - 'desc' => esc_html__('Fully Customizable. Multi-Media Integration. Synch Any Data Files. All Within Block Editor.', 'shopengine'), | |
| 306 | - 'docs' => 'https://wpmet.com/doc/tablekit/', | |
| 307 | - ], | |
| 308 | - 'getgenie/getgenie.php' => [ | |
| 309 | - 'name' => esc_html__('GetGenie', 'shopengine'), | |
| 310 | - 'url' => 'https://wordpress.org/plugins/getgenie/', | |
| 311 | - 'icon' => $apps_img_path.'getgenie.gif', | |
| 312 | - 'desc' => esc_html__('Your personal AI assistant for content and SEO. Write content that ranks on Google with NLP keywords and SERP analysis data.', 'shopengine'), | |
| 313 | - 'docs' => 'https://getgenie.ai/docs/', | |
| 314 | - ], | |
| 315 | - 'emailkit/EmailKit.php' => [ | |
| 316 | - 'name' => esc_html__('EmailKit', 'shopengine'), | |
| 317 | - 'url' => 'https://wordpress.org/plugins/emailkit/', | |
| 318 | - 'icon' => $apps_img_path . 'emailkit.png', | |
| 319 | - 'desc' => esc_html__('Advanced email customizer for WooCommerce and WordPress. Build, customize, and send emails from WordPress to boost your sales!', 'shopengine'), | |
| 320 | - 'docs' => 'https://wpmet.com/doc/emailkit/', | |
| 321 | - ], | |
| 322 | - 'wp-social/wp-social.php' => [ | |
| 323 | - 'name' => esc_html__('WP Social', 'shopengine'), | |
| 324 | - 'url' => 'https://wordpress.org/plugins/wp-social/', | |
| 325 | - 'icon' => $apps_img_path . 'wp-social.png', | |
| 326 | - 'desc' => esc_html__('Add social share, login, and engagement counter — unified solution for all social media with tons of different styles for your website.', 'shopengine'), | |
| 327 | - 'docs' => 'https://wpmet.com/doc/wp-social/', | |
| 328 | - ], | |
| 329 | - 'blocks-for-shopengine/shopengine-gutenberg-addon.php' => [ | |
| 330 | - 'name' => esc_html__('Blocks for ShopEngine', 'shopengine'), | |
| 331 | - 'url' => 'https://wordpress.org/plugins/blocks-for-shopengine/', | |
| 332 | - 'icon' => $apps_img_path. 'shopengine.gif', | |
| 333 | - 'desc' => esc_html__('All in one WooCommerce solution for Gutenberg! Build your WooCommerce pages in a block editor with full customization.', 'shopengine'), | |
| 334 | - 'docs' => 'https://wpmet.com/doc/shopengine/shopengine-gutenberg/', | |
| 335 | - ], | |
| 336 | - ] | |
| 337 | - ) | |
| 338 | - ->call(); | |
| 339 | - | |
| 340 | - // working get instance of elementor widget | |
| 341 | - (new Manifest())->init(); | |
| 342 | - } ); | |
| 211 | + $apps_img_path = \ShopEngine::plugin_url() . 'assets/images/apps-page/'; | |
| 212 | + /** | |
| 213 | + * Show our plugins menu for others wpmet plugins | |
| 214 | + */ | |
| 215 | + \ShopEngine\Wpmet\Libs\Plugins::instance()->init('shopengine') | |
| 216 | + ->set_parent_menu_slug('shopengine-settings') | |
| 217 | + ->set_submenu_name('Our Plugins') | |
| 218 | + ->set_section_title('Get More out of Your WooCommerce Website!') | |
| 219 | + ->set_section_description('Install other plugins from us and take your WooCommerce site to the next level for absolutely free!') | |
| 220 | + ->set_items_per_row(4) | |
| 221 | + ->set_plugins( | |
| 222 | + [ | |
| 223 | + 'elementskit-lite/elementskit-lite.php' => [ | |
| 224 | + 'name' => esc_html__('ElementsKit', 'shopengine'), | |
| 225 | + 'url' => 'https://wordpress.org/plugins/elementskit-lite/', | |
| 226 | + 'icon' => $apps_img_path. 'elementskit.gif', | |
| 227 | + 'desc' => esc_html__('All-in-one Elementor addon trusted by 1 Million+ users, makes your website builder process easier with ultimate freedom.', 'shopengine'), | |
| 228 | + 'docs' => 'https://wpmet.com/doc/elementskit/', | |
| 229 | + ], | |
| 230 | + 'getgenie/getgenie.php' => [ | |
| 231 | + 'name' => esc_html__('GetGenie', 'shopengine'), | |
| 232 | + 'url' => 'https://wordpress.org/plugins/getgenie/', | |
| 233 | + 'icon' => $apps_img_path.'getgenie.gif', | |
| 234 | + 'desc' => esc_html__('Your personal AI assistant for content and SEO. Write content that ranks on Google with NLP keywords and SERP analysis data.', 'shopengine'), | |
| 235 | + 'docs' => 'https://getgenie.ai/docs/', | |
| 236 | + ], | |
| 237 | + 'gutenkit-blocks-addon/gutenkit-blocks-addon.php' => [ | |
| 238 | + 'name' => esc_html__('GutenKit', 'shopengine'), | |
| 239 | + 'url' => 'https://wordpress.org/plugins/gutenkit-blocks-addon/', | |
| 240 | + 'icon' => $apps_img_path. 'guten-kit.png', | |
| 241 | + 'desc' => esc_html__('Gutenberg blocks, patterns, and templates that extend the page-building experience using the WordPress block editor.', 'shopengine'), | |
| 242 | + 'docs' => 'https://wpmet.com/doc/gutenkit/', | |
| 243 | + ], | |
| 244 | + 'metform/metform.php' => [ | |
| 245 | + 'name' => esc_html__('MetForm', 'shopengine'), | |
| 246 | + 'url' => 'https://wordpress.org/plugins/metform/', | |
| 247 | + 'icon' => $apps_img_path. 'metform.png', | |
| 248 | + 'desc' => esc_html__('Drag & drop form builder for Elementor to create contact forms, multi-step forms, and more — smoother, faster, and better!', 'shopengine'), | |
| 249 | + 'docs' => 'https://wpmet.com/doc/metform/', | |
| 250 | + ], | |
| 251 | + 'emailkit/EmailKit.php' => [ | |
| 252 | + 'name' => esc_html__('EmailKit', 'shopengine'), | |
| 253 | + 'url' => 'https://wordpress.org/plugins/emailkit/', | |
| 254 | + 'icon' => $apps_img_path . 'emailkit.png', | |
| 255 | + 'desc' => esc_html__('Advanced email customizer for WooCommerce and WordPress. Build, customize, and send emails from WordPress to boost your sales!', 'shopengine'), | |
| 256 | + 'docs' => 'https://wpmet.com/doc/emailkit/', | |
| 257 | + ], | |
| 258 | + 'wp-social/wp-social.php' => [ | |
| 259 | + 'name' => esc_html__('WP Social', 'shopengine'), | |
| 260 | + 'url' => 'https://wordpress.org/plugins/wp-social/', | |
| 261 | + 'icon' => $apps_img_path . 'wp-social.png', | |
| 262 | + 'desc' => esc_html__('Add social share, login, and engagement counter — unified solution for all social media with tons of different styles for your website.', 'shopengine'), | |
| 263 | + 'docs' => 'https://wpmet.com/doc/wp-social/', | |
| 264 | + ], | |
| 265 | + 'wp-ultimate-review/wp-ultimate-review.php' => [ | |
| 266 | + 'name' => esc_html__('WP Ultimate Review', 'shopengine'), | |
| 267 | + 'url' => 'https://wordpress.org/plugins/wp-ultimate-review/', | |
| 268 | + 'icon' => $apps_img_path . 'ultimate-review.png', | |
| 269 | + 'desc' => esc_html__('Collect and showcase reviews on your website to build brand credibility and social proof with the easiest solution.','shopengine'), | |
| 270 | + 'docs' => 'https://wpmet.com/doc/wp-ultimate-review/', | |
| 271 | + ], | |
| 272 | + 'wp-fundraising-donation/wp-fundraising.php' => [ | |
| 273 | + 'name' => esc_html__('FundEngine', 'shopengine'), | |
| 274 | + 'url' => 'https://wordpress.org/plugins/wp-fundraising-donation/', | |
| 275 | + 'icon' => $apps_img_path . 'fundengine.png', | |
| 276 | + 'desc' => esc_html__('Create fundraising, crowdfunding, and donation websites with PayPal and Stripe payment gateway integration.', 'shopengine'), | |
| 277 | + 'docs' => 'https://wpmet.com/doc/fundengine/', | |
| 278 | + ], | |
| 279 | + 'blocks-for-shopengine/shopengine-gutenberg-addon.php' => [ | |
| 280 | + 'name' => esc_html__('Blocks for ShopEngine', 'shopengine'), | |
| 281 | + 'url' => 'https://wordpress.org/plugins/blocks-for-shopengine/', | |
| 282 | + 'icon' => $apps_img_path. 'shopengine.gif', | |
| 283 | + 'desc' => esc_html__('All in one WooCommerce solution for Gutenberg! Build your WooCommerce pages in a block editor with full customization.', 'shopengine'), | |
| 284 | + 'docs' => 'https://wpmet.com/doc/shopengine/shopengine-gutenberg/', | |
| 285 | + ], | |
| 286 | + 'genie-image-ai/genie-image-ai.php' => [ | |
| 287 | + 'name' => esc_html__('Genie Image', 'shopengine'), | |
| 288 | + 'url' => 'https://wordpress.org/plugins/genie-image-ai/', | |
| 289 | + 'icon' => $apps_img_path . 'genie-image.png', | |
| 290 | + 'desc' => esc_html__('AI-powered text-to-image generator for WordPress with OpenAI’s DALL-E 2 technology to generate high-quality images in one click. | |
| 291 | + ', 'shopengine'), | |
| 292 | + 'docs' => 'https://getgenie.ai/docs/', | |
| 293 | + ], | |
| 294 | + ] | |
| 295 | + ) | |
| 296 | + ->call(); | |
| 343 | 297 | |
| 344 | 298 | |
| 345 | 299 | |
| 346 | 300 | \ShopEngine\Core\MultiLanguage\Language::instance()->init(); |
| @@ -351,8 +305,10 @@ | ||
| 351 | 305 | new Libs\Select_Api\Base(); |
| 352 | 306 | |
| 353 | 307 | (new Module_Manifest())->init(); |
| 354 | 308 | |
| 309 | + // working get instance of elementor widget | |
| 310 | + (new Manifest())->init(); | |
| 355 | 311 | |
| 356 | 312 | Query_Modifier::instance()->init(); |
| 357 | 313 | |
| 358 | 314 | (new Conflict_Manifest())->init(); |
| @@ -383,27 +339,9 @@ | ||
| 383 | 339 | //it will register an option in customizer for woocommerce products catelog. It's related with our Arcive Products widget. |
| 384 | 340 | Register_Settings::instance()->init(); |
| 385 | 341 | } |
| 386 | 342 | |
| 387 | - public function shopengine_wcmmq_cart_validation_compat( $check, $request ) { | |
| 388 | - | |
| 389 | - $cart_widget_flag = isset( $_REQUEST['shopengine_cart_widget'] ) | |
| 390 | - ? sanitize_text_field( wp_unslash( $_REQUEST['shopengine_cart_widget'] ) ) | |
| 391 | - : ''; | |
| 392 | - $cart_widget_nonce = isset( $_REQUEST['shopengine_cart_widget_nonce'] ) | |
| 393 | - ? sanitize_text_field( wp_unslash( $_REQUEST['shopengine_cart_widget_nonce'] ) ) | |
| 394 | - : ''; | |
| 395 | 343 | |
| 396 | - if ( $cart_widget_flag === '1' && wp_verify_nonce( $cart_widget_nonce, 'shopengine_cart_widget' ) ) { | |
| 397 | - return false; // Skip WC MMQ validation for verified ShopEngine cart widget requests | |
| 398 | - } | |
| 399 | - return $check; // Proceed with normal validation for other requests | |
| 400 | - } | |
| 401 | - | |
| 402 | - | |
| 403 | - | |
| 404 | - | |
| 405 | - | |
| 406 | 344 | // add async and defer attributes to enqueued scripts |
| 407 | 345 | public function filter_load_type($tag, $handle, $src) { |
| 408 | 346 | |
| 409 | 347 | if(strpos($handle, '-async') !== false) { |
| @@ -567,19 +505,8 @@ | ||
| 567 | 505 | $btn['label'] = esc_html__('Install Elementor', 'shopengine'); |
| 568 | 506 | $btn['url'] = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=elementor'), 'install-plugin_elementor'); |
| 569 | 507 | } |
| 570 | 508 | |
| 571 | - if(file_exists(WP_PLUGIN_DIR . '/blocks-for-shopengine/shopengine-gutenberg-addon.php')) { | |
| 572 | - | |
| 573 | - $btn2['label'] = esc_html__('Activate Blocks for ShopEngine', 'shopengine'); | |
| 574 | - $btn2['url'] = wp_nonce_url('plugins.php?action=activate&plugin=blocks-for-shopengine/shopengine-gutenberg-addon.php&plugin_status=all&paged=1', 'activate-plugin_blocks-for-shopengine/shopengine-gutenberg-addon.php'); | |
| 575 | - | |
| 576 | - } else { | |
| 577 | - | |
| 578 | - $btn2['label'] = esc_html__('Install Blocks for ShopEngine', 'shopengine'); | |
| 579 | - $btn2['url'] = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=blocks-for-shopengine'), 'install-plugin_blocks-for-shopengine'); | |
| 580 | - } | |
| 581 | - | |
| 582 | 509 | Utils\Notice::push( |
| 583 | 510 | [ |
| 584 | 511 | 'id' => 'missing-elementor', |
| 585 | 512 | 'type' => 'error', |
| @@ -585,10 +512,9 @@ | ||
| 585 | 512 | 'type' => 'error', |
| 586 | 513 | 'is_required' => true, |
| 587 | 514 | 'dismissible' => true, |
| 588 | 515 | 'btn' => $btn, |
| 589 | - 'btn2' => $btn2, | |
| 590 | - 'message' => esc_html__('To use ShopEngine, install Elementor (For the Elementor Builder) OR Blocks for ShopEngine (For Gutenberg Builder).', 'shopengine'), | |
| 516 | + 'message' => sprintf(esc_html__('ShopEngine requires Elementor version %1$s+, which is currently NOT RUNNING.', 'shopengine'), '3.0.0'), | |
| 591 | 517 | ] |
| 592 | 518 | ); |
| 593 | 519 | } |
| 594 | 520 | |