mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Do not check physical product on amount allowed
This commit is contained in:
parent
31f91cd976
commit
7b76a9f653
1 changed files with 0 additions and 17 deletions
|
@ -35,14 +35,6 @@ class CheckoutHelper {
|
|||
if ( $cart_total < $minimum || $cart_total > $maximum ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$items = $cart->get_cart_contents();
|
||||
foreach ( $items as $item ) {
|
||||
$product = wc_get_product( $item['product_id'] );
|
||||
if ( is_a( $product, WC_Product::class ) && ! $this->is_physical_product( $product ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_wc_endpoint_url( 'order-pay' ) ) {
|
||||
|
@ -61,15 +53,6 @@ class CheckoutHelper {
|
|||
if ( $order_total < $minimum || $order_total > $maximum ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ( $order->get_items() as $item_id => $item ) {
|
||||
if ( is_a( $item, WC_Order_Item_Product::class ) ) {
|
||||
$product = wc_get_product( $item->get_product_id() );
|
||||
if ( is_a( $product, WC_Product::class ) && ! $this->is_physical_product( $product ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue