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