This commit is contained in:
David Remer 2020-07-15 07:53:46 +03:00
parent bf85d3d47d
commit 87aaedaf68

View file

@ -58,8 +58,7 @@ class SmartButton implements SmartButtonInterface
$buttonRenderer = static function () {
$product = wc_get_product();
if (
! is_checkout() && is_a($product, \WC_Product::class)
if (! is_checkout() && is_a($product, \WC_Product::class)
&& (
$product->is_type(['external', 'grouped'])
|| ! $product->is_in_stock()
@ -76,8 +75,7 @@ class SmartButton implements SmartButtonInterface
return;
}
$product = wc_get_product();
if (
! is_checkout() && is_a($product, \WC_Product::class)
if (! is_checkout() && is_a($product, \WC_Product::class)
&& (
$product->is_type(['external', 'grouped'])
|| ! $product->is_in_stock()