Skip to content

Commit

Permalink
Merge pull request #2896 from woocommerce/PCP-731-queries-variations-…
Browse files Browse the repository at this point in the history
…when-button/messaging-is-disabled-on-single-product-page

plugin generates empty div & queries variations when button/messaging is disabled on single product page
  • Loading branch information
InpsydeNiklas authored Dec 23, 2024
2 parents cb8c3f8 + 14f9121 commit 26abc74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ppcp-button/src/Assets/SmartButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,7 @@ protected function product_supports_payment( WC_Product $product ): bool {

$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.
*
Expand Down

0 comments on commit 26abc74

Please sign in to comment.