surecart
Last commit date
app
2 years ago
core
3 years ago
dist
2 years ago
images
3 years ago
languages
2 years ago
packages
2 years ago
templates
2 years ago
vendor
2 years ago
views
2 years ago
LICENSE
3 years ago
README.md
3 years ago
package.json
2 years ago
readme.txt
2 years ago
surecart.php
2 years ago
surecart.php
61 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: SureCart |
| 4 | * Plugin URI: https://surecart.com/ |
| 5 | * Description: A simple yet powerful headless e-commerce platform designed to grow your business with effortlessly selling online. |
| 6 | * Version: 2.11.3 |
| 7 | * Requires at least: 6.2 |
| 8 | * Requires PHP: 7.4 |
| 9 | * Author: SureCart |
| 10 | * Author URI: https://surecart.com |
| 11 | * License: GPL-2.0-only |
| 12 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 13 | * Text Domain: surecart |
| 14 | * Domain Path: /languages |
| 15 | * |
| 16 | * YOU SHOULD NORMALLY NOT NEED TO ADD ANYTHING HERE - any custom functionality unrelated |
| 17 | * to bootstrapping the theme should go into a service provider or a separate helper file |
| 18 | * (refer to the directory structure in README.md). |
| 19 | * |
| 20 | * @package SureCart |
| 21 | */ |
| 22 | |
| 23 | if ( ! defined( 'ABSPATH' ) ) { |
| 24 | exit; |
| 25 | } |
| 26 | |
| 27 | define( 'SURECART_PLUGIN_FILE', __FILE__ ); |
| 28 | |
| 29 | define( 'SURECART_PLUGIN_DIR_NAME', dirname( plugin_basename( SURECART_PLUGIN_FILE ) ) ); |
| 30 | define( 'SURECART_LANGUAGE_DIR', __DIR__ . DIRECTORY_SEPARATOR . 'languages' ); |
| 31 | define( 'SURECART_VENDOR_DIR', __DIR__ . DIRECTORY_SEPARATOR . 'vendor' ); |
| 32 | |
| 33 | // define host url. |
| 34 | if ( ! defined( 'SURECART_APP_URL' ) ) { |
| 35 | define( 'SURECART_APP_URL', 'https://app.surecart.com' ); |
| 36 | } |
| 37 | if ( ! defined( 'SURECART_API_URL' ) ) { |
| 38 | define( 'SURECART_API_URL', 'https://api.surecart.com' ); |
| 39 | } |
| 40 | if ( ! defined( 'SURECART_JS_URL' ) ) { |
| 41 | define( 'SURECART_JS_URL', 'https://js.surecart.com' ); |
| 42 | } |
| 43 | if ( ! defined( 'SURECART_CDN_IMAGE_BASE' ) ) { |
| 44 | define( 'SURECART_CDN_IMAGE_BASE', 'https://surecart.com/cdn-cgi/image' ); |
| 45 | } |
| 46 | |
| 47 | // Load composer dependencies. |
| 48 | if ( file_exists( SURECART_VENDOR_DIR . DIRECTORY_SEPARATOR . 'autoload.php' ) ) { |
| 49 | require_once SURECART_VENDOR_DIR . DIRECTORY_SEPARATOR . 'autoload.php'; |
| 50 | } |
| 51 | |
| 52 | // Load helpers. |
| 53 | require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'SureCart.php'; |
| 54 | require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'helpers.php'; |
| 55 | |
| 56 | // Bootstrap plugin after all dependencies and helpers are loaded. |
| 57 | \SureCart::make()->bootstrap( require __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'config.php' ); |
| 58 | |
| 59 | // Register hooks. |
| 60 | require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'hooks.php'; |
| 61 |