diff --git a/includes/paytabs_payment_methods.php b/includes/paytabs_payment_methods.php index 991fc87..8b25a1d 100755 --- a/includes/paytabs_payment_methods.php +++ b/includes/paytabs_payment_methods.php @@ -277,7 +277,7 @@ function payment_fields() $this->tokenization_script(); $this->saved_payment_methods(); - $has_subscription = WC_Subscriptions_Cart::cart_contains_subscription(); + $has_subscription = class_exists('WC_Subscriptions_Cart') && WC_Subscriptions_Cart::cart_contains_subscription(); if ($has_subscription) { echo wpautop('Will Save to Account'); } else { diff --git a/paytabs-woocommerce.php b/paytabs-woocommerce.php index 7263359..4d59125 100644 --- a/paytabs-woocommerce.php +++ b/paytabs-woocommerce.php @@ -8,11 +8,11 @@ * Plugin Name: PayTabs - WooCommerce Payment Gateway * Plugin URI: https://paytabs.com/ * Description: PayTabs is a 3rd party payment gateway. Ideal payment solutions for your internet business. - * Version: 4.5.4 + * Version: 4.5.5 * Requires PHP: 7.0 * Author: PayTabs * Author URI: w.kammoun@paytabs.com - * Revision Date: 22/September/2021 + * Revision Date: 23/September/2021 */ if (!function_exists('add_action')) { @@ -20,14 +20,14 @@ } -define('PAYTABS_PAYPAGE_VERSION', '4.5.4'); +define('PAYTABS_PAYPAGE_VERSION', '4.5.5'); define('PAYTABS_PAYPAGE_DIR', plugin_dir_path(__FILE__)); define('PAYTABS_PAYPAGE_ICONS_URL', plugins_url("icons/", __FILE__)); define('PAYTABS_DEBUG_FILE', WP_CONTENT_DIR . "/debug_paytabs.log"); define('PAYTABS_PAYPAGE_METHODS', [ + 'mada' => 'WC_Gateway_Paytabs_Mada', 'all' => 'WC_Gateway_Paytabs_All', 'creditcard' => 'WC_Gateway_Paytabs_Creditcard', - 'mada' => 'WC_Gateway_Paytabs_Mada', 'stcpay' => 'WC_Gateway_Paytabs_Stcpay', // 'stcpayqr' => 'WC_Gateway_Paytabs_Stcpayqr', 'applepay' => 'WC_Gateway_Paytabs_Applepay',