We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f851a5 commit 5852018Copy full SHA for 5852018
src/Features/Subscriptions/YithSubscriptionPluginHandler.php
@@ -306,15 +306,13 @@ public function get_subscription_payment_method_friendly_name( $subscription ) {
306
* @return bool
307
*/
308
function cart_has_subscription() {
309
- // Ensure YITH WooCommerce Subscription plugin is active
+
310
if (!function_exists('YITH_WC_Subscription')) {
311
return false;
312
}
313
314
- // Get the YITH_WC_Subscription instance
315
$ywsbs = YITH_WC_Subscription();
316
317
- // Use the is_subscription method to check if the product is a subscription
318
- return $ywsbs->cart_has_subscriptions();
+ return is_string($ywsbs->cart_has_subscriptions());
319
320
0 commit comments