PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.5.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.5.0
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 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / shopengine.php
shopengine Last commit date
assets 2 years ago base 3 years ago compatibility 3 years ago core 2 years ago languages 2 years ago libs 2 years ago modules 2 years ago traits 3 years ago utils 2 years ago widgets 2 years ago woocommerce 2 years ago autoloader.php 4 years ago phpcs.xml 3 years ago plugin.php 2 years ago readme.txt 2 years ago shopengine.php 2 years ago
shopengine.php
332 lines
1 <?php
2
3 /**
4 * Plugin Name: ShopEngine
5 * Plugin URI: https://wpmet.com/plugin/shopengine
6 * Description: ShopEngine is the most-complete WooCommerce template builder for Elementor. It helps you build and customize the single product page, cart page, archive page, checkout page, order page, my account page, and thank-you page from scratch. It also packed with product comparison, wishlist, quick view, and variation swatches etc.
7 * Version: 4.5.0
8 * Author: Wpmet
9 * Author URI: https://wpmet.com
10 * Text Domain: shopengine
11 * Domain Path: /languages
12 * License: GPLv3
13 * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
14 */
15
16
17 defined('ABSPATH') || exit;
18
19
20 require_once __DIR__ . '/autoloader.php';
21 require_once __DIR__ . '/utils/global-helper.php';
22
23 require_once plugin_dir_path( __FILE__ ) . 'utils/notice/notice.php';
24 require_once plugin_dir_path( __FILE__ ) . 'utils/banner/banner.php';
25
26 require_once plugin_dir_path( __FILE__ ) . 'utils/stories/stories.php';
27 require_once plugin_dir_path( __FILE__ ) . 'utils/pro-awareness/pro-awareness.php';
28
29
30 final class ShopEngine {
31
32 const SHOPENGINE_PREFIX = 'shopengine-builder';
33
34 /**
35 * Plugin Version
36 *
37 * @return string
38 * @since 1.0.0
39 *
40 */
41 public static function version() {
42 return '4.5.0';
43 }
44
45
46 /**
47 * Package type
48 *
49 * @return string
50 * @since 1.0.0
51 *
52 */
53 public static function package_type() {
54 return apply_filters('shopengine/core/package_type', 'free');
55 }
56
57 public static function landing_page($part = 'pricing') {
58 $site = trailingslashit('https://wpmet.com/plugin/shopengine/' . $part);
59
60 return $site;
61 }
62
63
64 static function license_status() {
65
66 if(!class_exists('ShopEngine_Pro')) {
67 return 'invalid';
68 }
69
70 if(ShopEngine\Libs\License\Helper::instance()->status() != 'valid') {
71 return 'invalid';
72 }
73
74 return 'valid';
75 }
76
77 public static function license_data() {
78 if(!class_exists('\ElementsKit_Lite\Libs\Framework\Classes\Utils')) {
79 return [
80 'key' => '',
81 'checksum' => '',
82 'plugin_package' => self::package_type(),
83 ];
84 }
85
86 return array_merge(
87 ShopEngine\Libs\License\Helper::instance()->get_license(),
88 ['plugin_package' => self::package_type()]
89 );
90 }
91
92
93 /**
94 * Product ID
95 *
96 * @return string
97 * @since 1.0.0
98 *
99 */
100 static function product_id() {
101 return '0';
102 }
103
104
105 /**
106 * Plugin Author Name
107 *
108 * @return string
109 * @since 1.0.0
110 *
111 */
112 static function author_name() {
113 return 'Wpmet';
114 }
115
116 public static function store_name() {
117 return 'wpmet';
118 }
119
120
121 /**
122 * Minimum Elementor Version required to run the plugin.
123 *
124 * @return string
125 * @since 1.0.0
126 *
127 */
128 public static function min_el_version() {
129 return '3.0.0';
130 }
131
132
133 /**
134 * Minimum PHP Version required to run the plugin
135 *
136 * @return string
137 * @since 1.0.0
138 *
139 */
140 public static function min_php_version() {
141 return '7.0';
142 }
143
144
145 /**
146 * Minimum Woocommerce version required to run the plugin.
147 *
148 * @return string
149 * @since 1.0.0
150 *
151 */
152 public static function min_woo_version() {
153 return '4.1';
154 }
155
156
157 /**
158 * Plugin file plugins's root file.
159 *
160 * @return string
161 * @since 1.0.0
162 *
163 */
164 public static function plugin_file() {
165 return __FILE__;
166 }
167
168
169 /**
170 * Plugin url
171 *
172 * @return mixed
173 * @since 1.0.0
174 */
175 public static function plugin_url() {
176 return trailingslashit(plugin_dir_url(__FILE__));
177 }
178
179
180 /**
181 * Plugin dir
182 *
183 * @return mixed
184 * @since 1.0.0
185 */
186 public static function plugin_dir() {
187 return trailingslashit(plugin_dir_path(__FILE__));
188 }
189
190
191 /**
192 * Plugin's widget directory.
193 *
194 * @return string
195 * @since 1.0.0
196 */
197 public static function widget_dir() {
198 return self::plugin_dir() . 'widgets/';
199 }
200
201
202 /**
203 * Plugin's widget url.
204 *
205 * @return string
206 * @since 1.0.0
207 */
208 public static function widget_url() {
209 return self::plugin_url() . 'widgets/';
210 }
211
212 /**
213 * Plugin's widget directory.
214 *
215 * @return string
216 * @since 1.0.0
217 */
218 public static function module_dir() {
219 return self::plugin_dir() . 'modules/';
220 }
221
222
223 /**
224 * Plugin's widget url.
225 *
226 * @return string
227 * @since 1.0.0
228 */
229 public static function module_url() {
230 return self::plugin_url() . 'modules/';
231 }
232
233
234 /**
235 * Plugin core directory
236 *
237 * @return string
238 * @since 1.0.0
239 */
240 public static function core_dir() {
241 return self::plugin_dir() . 'core/';
242 }
243
244 /**
245 * Plugin core url
246 *
247 * @return string
248 * @since 1.0.0
249 */
250 public static function core_url() {
251 return self::plugin_url() . 'core/';
252 }
253
254
255 /**
256 *
257 * @return string
258 * @since 1.0.0
259 */
260 public static function views_dir() {
261 return self::plugin_dir() . 'views/';
262 }
263
264
265 /**
266 * Constructor
267 *
268 * @since 1.0.0
269 * @access public
270 */
271 public function __construct() {
272 add_action('init', [$this, 'i18n']);
273 add_action('plugins_loaded', [$this, 'init'], 100);
274 }
275
276
277 /**
278 * Load text domain
279 *
280 * Load plugin localization files.
281 * Fired by `init` action hook.
282 *
283 * @since 1.0.0
284 * @access public
285 */
286 public function i18n() {
287
288 load_plugin_textdomain('shopengine', false, self::plugin_dir() . 'languages/');
289 }
290
291
292 public function init() {
293 do_action('shopengine/before_loaded');
294
295 // Declaring compatibility with custom order tables for the WooCommerce plugin.
296 add_action( 'before_woocommerce_init', [ $this, 'woocommerce_custom_order_table_compatibility' ] );
297
298 ShopEngine\Plugin::instance()->init();
299 do_action('shopengine/after_loaded');
300 }
301
302 /**
303 * Compatibility with custom order tables for the WooCommerce plugin
304 *
305 * @since 4.2.1
306 * @access public
307 * @return void
308 */
309 public function woocommerce_custom_order_table_compatibility(){
310 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
311 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
312 }
313 }
314 }
315
316
317 new ShopEngine();
318
319 function activate_shopengine() {
320
321 \ShopEngine\Core\Template_Cpt::instance()->init();
322
323 flush_rewrite_rules();
324 }
325
326
327 function deactivate_shopengine() {}
328
329 register_activation_hook(__FILE__, 'activate_shopengine');
330
331 register_deactivation_hook(__FILE__, 'deactivate_shopengine');
332