From 87aaedaf68871d770a82533a905f2b559de7d3f5 Mon Sep 17 00:00:00 2001 From: David Remer Date: Wed, 15 Jul 2020 07:53:46 +0300 Subject: [PATCH] phpcs --- modules.local/ppcp-button/src/Assets/SmartButton.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules.local/ppcp-button/src/Assets/SmartButton.php b/modules.local/ppcp-button/src/Assets/SmartButton.php index ffb01ec32..ab7add156 100644 --- a/modules.local/ppcp-button/src/Assets/SmartButton.php +++ b/modules.local/ppcp-button/src/Assets/SmartButton.php @@ -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()