| 1 |
<?php |
| 2 |
/** |
| 3 |
* PayPal Commerce Gateway Loader |
| 4 |
* |
| 5 |
* Include this file to load the PayPal Commerce gateway. |
| 6 |
* |
| 7 |
* @package Charitable/Gateways/PayPal Commerce |
| 8 |
* @author WP Charitable |
| 9 |
* @copyright Copyright (c) 2024-2025, Studio 164a |
| 10 |
* @license GPL-2.0+ |
| 11 |
* @since 1.8.11 |
| 12 |
*/ |
| 13 |
|
| 14 |
// Exit if accessed directly. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
// Check minimum PHP version. |
| 20 |
if ( version_compare( PHP_VERSION, '7.4', '<' ) ) { |
| 21 |
return; |
| 22 |
} |
| 23 |
|
| 24 |
// Define gateway constants. |
| 25 |
if ( ! defined( 'CHARITABLE_PAYPAL_COMMERCE_VERSION' ) ) { |
| 26 |
define( 'CHARITABLE_PAYPAL_COMMERCE_VERSION', '1.0.0' ); |
| 27 |
} |
| 28 |
|
| 29 |
// Load structured logger helper (must load before gateway/hooks so they can call it). |
| 30 |
require_once dirname( __FILE__ ) . '/class-charitable-paypal-logger.php'; |
| 31 |
|
| 32 |
// Load gateway class. |
| 33 |
require_once dirname( __FILE__ ) . '/class-charitable-gateway-paypal-commerce.php'; |
| 34 |
|
| 35 |
// Load middleware client. |
| 36 |
require_once dirname( __FILE__ ) . '/class-charitable-paypal-middleware-client.php'; |
| 37 |
|
| 38 |
// Load hooks. |
| 39 |
require_once dirname( __FILE__ ) . '/charitable-paypal-commerce-hooks.php'; |
| 40 |
|
| 41 |
// Load WP-CLI commands (file self-skips when WP-CLI is not running). |
| 42 |
require_once dirname( __FILE__ ) . '/class-charitable-paypal-cli.php'; |
| 43 |
|