when variable product is in stock there is no need to query all variations

This commit is contained in:
Daniel Hüsken 2024-12-10 13:23:20 +01:00
parent 7509dfb702
commit 14f91218f6
No known key found for this signature in database
GPG key ID: 9F732DA37FA709E8

View file

@ -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.
*