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