PluginProbe
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets / 2.2.2
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets v2.2.2
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 All 85 releases
← All changes | plugin.php +22 -29 3.1.12.2.2 View file →
@@ -3,13 +3,11 @@
3 3 namespace ShopEngine;
4 4
5 5 use ShopEngine\Compatibility\Conflicts\Manifest as Conflict_Manifest;
6 6 use ShopEngine\Core\Builders\Base;
7 -use ShopEngine\Compatibility\Migrations\LangMigration;
8 7 use ShopEngine\Core\Query_Modifier;
9 8 use ShopEngine\Core\Template_Cpt;
10 9 use ShopEngine\Libs\License\License_Route;
11 -use ShopEngine\Libs\Rating\Rating;
12 10 use ShopEngine\Libs\Updater\Init as Updater;
13 11 use ShopEngine\Modules\Manifest as Module_Manifest;
14 12 use ShopEngine\Widgets\Manifest;
15 13
@@ -75,14 +73,12 @@
75 73
76 74 if($error) {
77 75 return;
78 76 }
79 -
77 +
80 78 add_filter("plugin_action_links_shopengine/shopengine.php", function ($links) {
81 - $free = esc_html__("Go To Shopengine","shopengine");
82 - $pro = esc_html__("Go To ShopenginePro","shopengine");
83 79
84 - $custom_links[] = '<a title="' . $free . '" href="'.admin_url('edit.php?post_type=shopengine-template#getting-started').'" target="_blank">' . esc_html__('Settings', 'shopengine') . '</a>';
80 + $custom_links[] = '<a href="'.admin_url('edit.php?post_type=shopengine-template#getting-started').'" target="_blank">' . esc_html__('Settings', 'shopengine') . '</a>';
85 81
86 82 foreach ($custom_links as $custom_link):
87 83 array_unshift($links, $custom_link);
88 84 endforeach;
@@ -87,9 +83,9 @@
87 83 array_unshift($links, $custom_link);
88 84 endforeach;
89 85
90 86 if (!is_plugin_active('shopengine-pro/shopengine-pro.php')) {
91 - $links[] = '<a title="' . $pro . '" href="https://wpmet.com/plugin/shopengine/pricing/" style="color:#FCB214;font-weight:700" target="_blank" rel="noopener">' . esc_html__('Go Pro', 'shopengine') . '</a>';
87 + $links[] = '<a href="https://wpmet.com/plugin/shopengine/pricing/" style="color:#FCB214;font-weight:700" target="_blank">' . esc_html__('Go Pro', 'shopengine') . '</a>';
92 88 }
93 89 return $links;
94 90 });
95 91
@@ -107,17 +103,16 @@
107 103 add_action('admin_init', function () {
108 104 if(class_exists('ShopEngine_Pro')) {
109 105 new Updater();
110 106 }
111 - new \ShopEngine\Compatibility\Migrations\Direct_Checkout;
112 107 });
113 108
114 109
115 110 add_action('wp_loaded', function () {
116 - //phpcs:ignore WordPress.Security.NonceVerification.Recommended --It's a fronted user part, not possible to verify nonce here
111 +
117 112 if(isset($_REQUEST['preview']) && $_REQUEST['preview'] == 'true' && !empty($_REQUEST['preview_id'])) {
118 113
119 - $pid = (int)$_REQUEST['preview_id']; //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- It's a fronted user part, not possible to verify nonce here
114 + $pid = (int)$_REQUEST['preview_id'];
120 115
121 116 $po = get_post($pid);
122 117
123 118 if($po->post_type === Template_Cpt::TYPE) {
@@ -139,13 +134,8 @@
139 134 wp_safe_redirect($url);
140 135 exit;
141 136 }
142 137 }
143 -
144 - /**
145 - * migrate data
146 - */
147 - LangMigration::instance()->init();
148 138 });
149 139
150 140 // avoid themes for loading woocommerce functions
151 141 $avoid_themes = ['avada', 'avada child'];
@@ -178,21 +168,12 @@
178 168 add_theme_support('wc-product-gallery-lightbox');
179 169 add_theme_support('wc-product-gallery-slider');
180 170 }
181 171
172 +
182 173 #Registering new post-type & etc
183 174 Base::instance()->init();
184 175
185 - Rating::instance('shopengine')
186 - ->set_plugin( 'ShopEngine', 'https://wpmet.com/wordpress.org/rating/shopengine' )
187 - ->set_plugin_logo( 'https://ps.w.org/shopengine/assets/icon-256x256.gif?rev=2505061', 'width:150px !important' )
188 - ->set_priority( 10 )
189 - ->set_first_appear_day( 7 )
190 - ->set_condition( true )
191 - ->call();
192 -
193 - \ShopEngine\Core\MultiLanguage\Language::instance()->init();
194 -
195 176 \ShopEngine\Core\Settings\Base::instance()->init();
196 177
197 178 new Libs\Select_Api\Base();
198 179
@@ -209,9 +190,9 @@
209 190 add_action('get_header', [$this, 'shopengine_track_product_views']);
210 191
211 192 // database migrations
212 193 // (new \ShopEngine\Compatibility\Migrations\Migration())->init();
213 - // (new \ShopEngine\Compatibility\Migrations\Temp_Migration())->init();
194 + (new \ShopEngine\Compatibility\Migrations\Temp_Migration())->init();
214 195
215 196
216 197 // call service providers
217 198
@@ -225,8 +206,10 @@
225 206 }
226 207
227 208 }
228 209
210 +
211 +
229 212 add_filter('script_loader_tag', [$this, 'filter_load_type'], 99, 3);
230 213 }
231 214
232 215
@@ -259,9 +242,9 @@
259 242 $cookie_name = "shopengine_recent_viewed_product";
260 243
261 244 if(isset($_COOKIE[$cookie_name])) {
262 245
263 - $cookie_ids = sanitize_text_field(wp_unslash($_COOKIE[$cookie_name]));
246 + $cookie_ids = $_COOKIE[$cookie_name];
264 247 $product_ids = explode(',', $cookie_ids);
265 248
266 249 if(!is_array($product_ids)) {
267 250 $product_ids = [$product_ids];
@@ -297,10 +280,12 @@
297 280 * Include public function
298 281 *
299 282 * @since 1.0.0
300 283 */
301 - public function js_css_public() {
302 - wp_register_style('shopengine-public', \ShopEngine::plugin_url() . 'assets/css/shopengine-public.css', false, \ShopEngine::version());
284 + public function js_css_public() {
285 + wp_enqueue_style('shopengine-icon', \ShopEngine::plugin_url() . 'assets/css/shopengine-icon.css', false, \ShopEngine::version());
286 + wp_enqueue_style('shopengine-simple-scrollbar-css', \ShopEngine::plugin_url() . 'assets/css/simple-scrollbar.css', false, \ShopEngine::version());
287 + wp_enqueue_style('shopengine-public-css', \ShopEngine::plugin_url() . 'assets/css/public-style.css', false, \ShopEngine::version());
303 288
304 289 // Modal Stylesheet
305 290 wp_register_style('shopengine-modal-styles', \ShopEngine::plugin_url() . 'assets/css/shopengine-modal.css', false, \ShopEngine::version());
306 291
@@ -349,8 +334,12 @@
349 334
350 335
351 336 public function missing_woocommerce() {
352 337
338 + if(isset($_GET['activate'])) {
339 + unset($_GET['activate']);
340 + }
341 +
353 342 if(file_exists(WP_PLUGIN_DIR . '/woocommerce/woocommerce.php')) {
354 343
355 344 $btn['label'] = esc_html__('Activate WooCommerce', 'shopengine');
356 345 $btn['url'] = wp_nonce_url('plugins.php?action=activate&plugin=woocommerce/woocommerce.php&plugin_status=all&paged=1', 'activate-plugin_woocommerce/woocommerce.php');
@@ -373,8 +362,12 @@
373 362 }
374 363
375 364
376 365 public function missing_elementor() {
366 +
367 + if(isset($_GET['activate'])) {
368 + unset($_GET['activate']);
369 + }
377 370
378 371 if(file_exists(WP_PLUGIN_DIR . '/elementor/elementor.php')) {
379 372
380 373 $btn['label'] = esc_html__('Activate Elementor', 'shopengine');