PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.6.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.6.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
333 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.6.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.php';
24 require_once plugin_dir_path( __FILE__ ) . 'utils/notice/notice.php';
25 require_once plugin_dir_path( __FILE__ ) . 'utils/banner/banner.php';
26
27 require_once plugin_dir_path( __FILE__ ) . 'utils/stories/stories.php';
28 require_once plugin_dir_path( __FILE__ ) . 'utils/pro-awareness/pro-awareness.php';
29
30
31 final class ShopEngine {
32
33 const SHOPENGINE_PREFIX = 'shopengine-builder';
34
35 /**
36 * Plugin Version
37 *
38 * @return string
39 * @since 1.0.0
40 *
41 */
42 public static function version() {
43 return '4.6.0';
44 }
45
46
47 /**
48 * Package type
49 *
50 * @return string
51 * @since 1.0.0
52 *
53 */
54 public static function package_type() {
55 return apply_filters('shopengine/core/package_type', 'free');
56 }
57
58 public static function landing_page($part = 'pricing') {
59 $site = trailingslashit('https://wpmet.com/plugin/shopengine/' . $part);
60
61 return $site;
62 }
63
64
65 static function license_status() {
66
67 if(!class_exists('ShopEngine_Pro')) {
68 return 'invalid';
69 }
70
71 if(ShopEngine\Libs\License\Helper::instance()->status() != 'valid') {
72 return 'invalid';
73 }
74
75 return 'valid';
76 }
77
78 public static function license_data() {
79 if(!class_exists('\ElementsKit_Lite\Libs\Framework\Classes\Utils')) {
80 return [
81 'key' => '',
82 'checksum' => '',
83 'plugin_package' => self::package_type(),
84 ];
85 }
86
87 return array_merge(
88 ShopEngine\Libs\License\Helper::instance()->get_license(),
89 ['plugin_package' => self::package_type()]
90 );
91 }
92
93
94 /**
95 * Product ID
96 *
97 * @return string
98 * @since 1.0.0
99 *
100 */
101 static function product_id() {
102 return '0';
103 }
104
105
106 /**
107 * Plugin Author Name
108 *
109 * @return string
110 * @since 1.0.0
111 *
112 */
113 static function author_name() {
114 return 'Wpmet';
115 }
116
117 public static function store_name() {
118 return 'wpmet';
119 }
120
121
122 /**
123 * Minimum Elementor Version required to run the plugin.
124 *
125 * @return string
126 * @since 1.0.0
127 *
128 */
129 public static function min_el_version() {
130 return '3.0.0';
131 }
132
133
134 /**
135 * Minimum PHP Version required to run the plugin
136 *
137 * @return string
138 * @since 1.0.0
139 *
140 */
141 public static function min_php_version() {
142 return '7.0';
143 }
144
145
146 /**
147 * Minimum Woocommerce version required to run the plugin.
148 *
149 * @return string
150 * @since 1.0.0
151 *
152 */
153 public static function min_woo_version() {
154 return '4.1';
155 }
156
157
158 /**
159 * Plugin file plugins's root file.
160 *
161 * @return string
162 * @since 1.0.0
163 *
164 */
165 public static function plugin_file() {
166 return __FILE__;
167 }
168
169
170 /**
171 * Plugin url
172 *
173 * @return mixed
174 * @since 1.0.0
175 */
176 public static function plugin_url() {
177 return trailingslashit(plugin_dir_url(__FILE__));
178 }
179
180
181 /**
182 * Plugin dir
183 *
184 * @return mixed
185 * @since 1.0.0
186 */
187 public static function plugin_dir() {
188 return trailingslashit(plugin_dir_path(__FILE__));
189 }
190
191
192 /**
193 * Plugin's widget directory.
194 *
195 * @return string
196 * @since 1.0.0
197 */
198 public static function widget_dir() {
199 return self::plugin_dir() . 'widgets/';
200 }
201
202
203 /**
204 * Plugin's widget url.
205 *
206 * @return string
207 * @since 1.0.0
208 */
209 public static function widget_url() {
210 return self::plugin_url() . 'widgets/';
211 }
212
213 /**
214 * Plugin's widget directory.
215 *
216 * @return string
217 * @since 1.0.0
218 */
219 public static function module_dir() {
220 return self::plugin_dir() . 'modules/';
221 }
222
223
224 /**
225 * Plugin's widget url.
226 *
227 * @return string
228 * @since 1.0.0
229 */
230 public static function module_url() {
231 return self::plugin_url() . 'modules/';
232 }
233
234
235 /**
236 * Plugin core directory
237 *
238 * @return string
239 * @since 1.0.0
240 */
241 public static function core_dir() {
242 return self::plugin_dir() . 'core/';
243 }
244
245 /**
246 * Plugin core url
247 *
248 * @return string
249 * @since 1.0.0
250 */
251 public static function core_url() {
252 return self::plugin_url() . 'core/';
253 }
254
255
256 /**
257 *
258 * @return string
259 * @since 1.0.0
260 */
261 public static function views_dir() {
262 return self::plugin_dir() . 'views/';
263 }
264
265
266 /**
267 * Constructor
268 *
269 * @since 1.0.0
270 * @access public
271 */
272 public function __construct() {
273 add_action('init', [$this, 'i18n']);
274 add_action('plugins_loaded', [$this, 'init'], 100);
275 }
276
277
278 /**
279 * Load text domain
280 *
281 * Load plugin localization files.
282 * Fired by `init` action hook.
283 *
284 * @since 1.0.0
285 * @access public
286 */
287 public function i18n() {
288
289 load_plugin_textdomain('shopengine', false, self::plugin_dir() . 'languages/');
290 }
291
292
293 public function init() {
294 do_action('shopengine/before_loaded');
295
296 // Declaring compatibility with custom order tables for the WooCommerce plugin.
297 add_action( 'before_woocommerce_init', [ $this, 'woocommerce_custom_order_table_compatibility' ] );
298
299 ShopEngine\Plugin::instance()->init();
300 do_action('shopengine/after_loaded');
301 }
302
303 /**
304 * Compatibility with custom order tables for the WooCommerce plugin
305 *
306 * @since 4.2.1
307 * @access public
308 * @return void
309 */
310 public function woocommerce_custom_order_table_compatibility(){
311 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
312 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
313 }
314 }
315 }
316
317
318 new ShopEngine();
319
320 function activate_shopengine() {
321
322 \ShopEngine\Core\Template_Cpt::instance()->init();
323
324 flush_rewrite_rules();
325 }
326
327
328 function deactivate_shopengine() {}
329
330 register_activation_hook(__FILE__, 'activate_shopengine');
331
332 register_deactivation_hook(__FILE__, 'deactivate_shopengine');
333