surecart
Last commit date
app
3 years ago
core
3 years ago
dist
3 years ago
images
3 years ago
languages
3 years ago
packages
3 years ago
templates
3 years ago
vendor
3 years ago
views
3 years ago
LICENSE
3 years ago
README.md
3 years ago
package.json
3 years ago
readme.txt
3 years ago
surecart.php
3 years ago
surecart.php
48 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: 1.4.2 |
| 7 | * Requires at least: 5.9 |
| 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 host url. |
| 30 | if ( ! defined( 'SURECART_APP_URL' ) ) { |
| 31 | define( 'SURECART_APP_URL', 'https://api.surecart.com' ); |
| 32 | } |
| 33 | |
| 34 | // Load composer dependencies. |
| 35 | if ( file_exists( __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php' ) ) { |
| 36 | require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; |
| 37 | } |
| 38 | |
| 39 | // Load helpers. |
| 40 | require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'SureCart.php'; |
| 41 | require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'helpers.php'; |
| 42 | |
| 43 | // Bootstrap plugin after all dependencies and helpers are loaded. |
| 44 | \SureCart::make()->bootstrap( require __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'config.php' ); |
| 45 | |
| 46 | // Register hooks. |
| 47 | require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'hooks.php'; |
| 48 |