mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
when variable product is in stock there is no need to query all variations
This commit is contained in:
parent
7509dfb702
commit
14f91218f6
1 changed files with 1 additions and 1 deletions
|
@ -1910,7 +1910,7 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
|
|||
|
||||
$in_stock = $product->is_in_stock();
|
||||
|
||||
if ( $product->is_type( 'variable' ) ) {
|
||||
if ( ! $in_stock && $product->is_type( 'variable' ) ) {
|
||||
/**
|
||||
* The method is defined in WC_Product_Variable class.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue