mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Exclude PayPal subscription products in free trial check
This commit is contained in:
parent
0bdbe116b3
commit
80cf93bfeb
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,11 @@ trait FreeTrialHandlerTrait {
|
||||||
|
|
||||||
foreach ( $cart->get_cart() as $item ) {
|
foreach ( $cart->get_cart() as $item ) {
|
||||||
$product = $item['data'] ?? null;
|
$product = $item['data'] ?? null;
|
||||||
if ( $product && WC_Subscriptions_Product::is_subscription( $product ) ) {
|
if (
|
||||||
|
$product
|
||||||
|
&& WC_Subscriptions_Product::is_subscription( $product )
|
||||||
|
&& ! $product->get_meta( 'ppcp_subscription_plan' )
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue