From cc2a21b53af6c1f9b509aaaee71ab9ba48f72d6e Mon Sep 17 00:00:00 2001 From: Fulvio Notarstefano Date: Thu, 26 Sep 2024 10:22:48 +0900 Subject: [PATCH] Update is_subscriptions_active --- .../payment-gateway/class-sv-wc-payment-gateway-plugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php index a2c6634c0..0ce12a370 100644 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php @@ -1370,8 +1370,6 @@ public function is_subscriptions_active() : bool { return $this->subscriptions_active; } - $this->subscriptions_active = class_exists( 'WC_Subscriptions_Core_Plugin' ) || $this->is_plugin_active( 'woocommerce-subscriptions.php' ); - /** * Filters whether WooCommerce Subscriptions is active. * @@ -1379,7 +1377,9 @@ public function is_subscriptions_active() : bool { * * @param bool $subscriptions_active */ - return (bool) apply_filters( 'sv_wc_payment_gateway_is_subscriptions_active', $this->subscriptions_active ); + $this->subscriptions_active = (bool) apply_filters( 'sv_wc_payment_gateway_is_subscriptions_active', class_exists( 'WC_Subscriptions_Core_Plugin' ) || $this->is_plugin_active( 'woocommerce-subscriptions.php' ) ); + + return $this->subscriptions_active; }