-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsurecart.php
60 lines (52 loc) · 2.17 KB
/
surecart.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
<?php
/**
* Plugin Name: SureCart
* Plugin URI: https://surecart.com/
* Description: A simple yet powerful headless e-commerce platform designed to grow your business with effortlessly selling online.
* Version: 2.16.3
* Requires at least: 6.2
* Requires PHP: 7.4
* Author: SureCart
* Author URI: https://surecart.com
* License: GPL-2.0-only
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: surecart
* Domain Path: /languages
*
* YOU SHOULD NORMALLY NOT NEED TO ADD ANYTHING HERE - any custom functionality unrelated
* to bootstrapping the theme should go into a service provider or a separate helper file
* (refer to the directory structure in README.md).
*
* @package SureCart
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'SURECART_PLUGIN_FILE', __FILE__ );
define( 'SURECART_PLUGIN_DIR_NAME', dirname( plugin_basename( SURECART_PLUGIN_FILE ) ) );
define( 'SURECART_LANGUAGE_DIR', __DIR__ . DIRECTORY_SEPARATOR . 'languages' );
define( 'SURECART_VENDOR_DIR', __DIR__ . DIRECTORY_SEPARATOR . 'vendor' );
// define host url.
if ( ! defined( 'SURECART_APP_URL' ) ) {
define( 'SURECART_APP_URL', 'https://app.surecart.com' );
}
if ( ! defined( 'SURECART_API_URL' ) ) {
define( 'SURECART_API_URL', 'https://api.surecart.com' );
}
if ( ! defined( 'SURECART_JS_URL' ) ) {
define( 'SURECART_JS_URL', 'https://js.surecart.com' );
}
if ( ! defined( 'SURECART_CDN_IMAGE_BASE' ) ) {
define( 'SURECART_CDN_IMAGE_BASE', 'https://surecart.com/cdn-cgi/image' );
}
// Load composer dependencies.
if ( file_exists( SURECART_VENDOR_DIR . DIRECTORY_SEPARATOR . 'autoload.php' ) ) {
require_once SURECART_VENDOR_DIR . DIRECTORY_SEPARATOR . 'autoload.php';
}
// Load helpers.
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'SureCart.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'helpers.php';
// Bootstrap plugin after all dependencies and helpers are loaded.
\SureCart::make()->bootstrap( require __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'config.php' );
// Register hooks.
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'hooks.php';