Skip to content

Commit

Permalink
Update is_subscriptions_active
Browse files Browse the repository at this point in the history
  • Loading branch information
unfulvio committed Sep 26, 2024
1 parent b82054a commit cc2a21b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1370,16 +1370,16 @@ 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.
*
* This future proofs the plugin for when WooCommerce Subscriptions is included as a core library or third party plugin embedding the core library.
*
* @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;
}


Expand Down

0 comments on commit cc2a21b

Please sign in to comment.