diff --git a/cryptocurrency-payments-for-paid-memberships-pro.php b/cryptocurrency-payments-for-paid-memberships-pro.php index b141ab1..ea6885e 100644 --- a/cryptocurrency-payments-for-paid-memberships-pro.php +++ b/cryptocurrency-payments-for-paid-memberships-pro.php @@ -12,7 +12,7 @@ /** * Plugin Name: CryptoPay Gateway for Paid Memberships Pro * Requires Plugins: paid-memberships-pro, cryptopay-wc-lite - * Version: 1.0.6 + * Version: 1.0.7 * Plugin URI: https://beycanpress.com/cryptopay/ * Description: Adds CryptoPay as a gateway option for Paid Memberships Pro. * Author: BeycanPress LLC @@ -30,11 +30,10 @@ use BeycanPress\CryptoPay\Loader; use BeycanPress\CryptoPay\PluginHero\Hook; -use BeycanPress\CryptoPayLite\Loader as LiteLoader; use BeycanPress\CryptoPayLite\PluginHero\Hook as LiteHook; define('PMPRO_CRYPTOPAY_FILE', __FILE__); -define('PMPRO_CRYPTOPAY_VERSION', '1.0.6'); +define('PMPRO_CRYPTOPAY_VERSION', '1.0.7'); define('PMPRO_CRYPTOPAY_URL', plugin_dir_url(__FILE__)); add_filter('wp_plugin_dependencies_slug', function ($slug) { @@ -45,11 +44,11 @@ }); register_activation_hook(PMPRO_CRYPTOPAY_FILE, function (): void { - if (class_exists(Loader::class)) { + if (defined('CRYPTOPAY_LOADED')) { require_once __DIR__ . '/classes/pro/class.pmpro_transaction_model.php'; (new PMPro_Transaction_Model())->createTable(); } - if (class_exists(LiteLoader::class)) { + if (defined('CRYPTOPAY_LITE_LOADED')) { require_once __DIR__ . '/classes/lite/class.pmpro_transaction_model.php'; (new PMPro_Transaction_Model_Lite())->createTable(); } @@ -61,7 +60,7 @@ */ function pmpro_cryptopay_addModels(): void { - if (class_exists(Loader::class)) { + if (defined('CRYPTOPAY_LOADED')) { require_once __DIR__ . '/classes/pro/class.pmpro_transaction_model.php'; Hook::addFilter('models', function ($models) { return array_merge($models, [ @@ -70,7 +69,7 @@ function pmpro_cryptopay_addModels(): void }); } - if (class_exists(LiteLoader::class)) { + if (defined('CRYPTOPAY_LITE_LOADED')) { require_once __DIR__ . '/classes/lite/class.pmpro_transaction_model.php'; LiteHook::addFilter('models', function ($models) { return array_merge($models, [ @@ -121,15 +120,15 @@ function pmpro_cryptopay_check_discount_code(object &$level, ?string $discountCo return; } - if ((class_exists(Loader::class) || class_exists(LiteLoader::class))) { + if ((defined('CRYPTOPAY_LOADED') || defined('CRYPTOPAY_LITE_LOADED'))) { require_once __DIR__ . '/classes/class.pmpro_ajax_api.php'; - if (class_exists(Loader::class)) { + if (defined('CRYPTOPAY_LOADED')) { require_once __DIR__ . '/classes/pro/class.pmpro_register_hooks.php'; require_once __DIR__ . '/classes/pro/class.pmprogateway_cryptopay.php'; } - if (class_exists(LiteLoader::class)) { + if (defined('CRYPTOPAY_LITE_LOADED')) { require_once __DIR__ . '/classes/lite/class.pmpro_register_hooks.php'; require_once __DIR__ . '/classes/lite/class.pmprogateway_cryptopay.php'; } diff --git a/readme.txt b/readme.txt index a17f9b7..ac6be37 100644 --- a/readme.txt +++ b/readme.txt @@ -4,8 +4,8 @@ Tags: Bitcoin, Ethereum, Binance Smart Chain, Blockchain, Networks, Cryptocurren Requires at least: 5.0 Tested up to: 6.5.0 Requires PHP: 8.1 -Stable Tag: 1.0.6 -Version: 1.0.6 +Stable Tag: 1.0.7 +Version: 1.0.7 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -55,6 +55,9 @@ You can easily translate with Loco translate. == Changelog == += 1.0.7 = +* Updated: Compatibility due to updates for new CryptoPay versions + = 1.0.6 = * Updated: Compatibility due to updates for WordPress 6.5.0