This repository was archived by the owner on Oct 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathwp-shopify.php
90 lines (60 loc) · 2.35 KB
/
wp-shopify.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
/*
@link https://wpshop.io
@since 1.3.4
@package wp-shopify
@wordpress-plugin
Plugin Name: WP Shopify
Plugin URI: https://wpshop.io
Description: Sell and build custom Shopify experiences on WordPress.
Version: 1.3.4
Author: WP Shopify
Author URI: https://wpshop.io
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Text Domain: wp-shopify
Domain Path: /languages
*/
global $wp_version;
if ( !function_exists('version_compare') || version_compare(PHP_VERSION, '5.6.0', '<' )) {
wp_die( __("Sorry, WP Shopify requires PHP version 5.6 or higher. Please look through <a href=\"https://wpshop.io/docs/requirements\" target=\"_blank\">our requirements</a> page to learn more. Often times you can simply ask your webhost to upgrade for you. <br><br><a href=" . admin_url('plugins.php') . " class=\"button button-primary\">Back to plugins</a>.", 'wp-shopify') );
}
if ( version_compare($wp_version, '4.7', '<' )) {
wp_die( __("Sorry, WP Shopify requires WordPress version 4.7 or higher. Please look through <a href=\"https://wpshop.io/docs/requirements\" target=\"_blank\">our requirements</a> page to learn more. Often times you can simply ask your webhost to upgrade for you. <br><br><a href=" . admin_url('plugins.php') . " class=\"button button-primary\">Back to plugins</a>.", 'wp-shopify') );
}
// If this file is called directly, abort.
if ( !defined('WPINC') ) {
die;
}
// If this file is called directly, abort.
if ( !defined('ABSPATH') ) {
die;
}
/*
Autoload everything
*/
require plugin_dir_path(__FILE__) . 'lib/autoloader.php'; // Our autoloader
require plugin_dir_path(__FILE__) . 'vendor/autoload.php'; // Composer autoloader
/*
Bootstrap everything
*/
use WPS\Bootstrap;
if ( !function_exists("WP_Shopify_Bootstrap") ) {
function WP_Shopify_Bootstrap() {
return Bootstrap::run();
}
}
/*
Performs the plugin bootstrap
*/
$GLOBALS['WP_Shopify'] = WP_Shopify_Bootstrap();
/*
Adds hooks which run on both plugin activation and deactivation.
The actions here are added during Activator->init() and Deactivator-init().
*/
register_activation_hook(__FILE__, function($network_wide) {
do_action('wps_on_plugin_activate', $network_wide);
});
register_deactivation_hook(__FILE__, function() {
do_action('wps_on_plugin_deactivate');
});