From 29df37cb76f985015d2b777e73725522f3789728 Mon Sep 17 00:00:00 2001 From: Carlos Bravo Date: Fri, 12 Aug 2022 16:01:48 +0200 Subject: [PATCH] Some more small refactors --- src/BlockTypesController.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/BlockTypesController.php b/src/BlockTypesController.php index dab774d21..b7dbead04 100644 --- a/src/BlockTypesController.php +++ b/src/BlockTypesController.php @@ -100,11 +100,14 @@ public function add_data_attributes( $content, $block ) { return $content; } - if ( 'woocommerce/all-products' === $block_name ) { - return $content; - } - - if ( 'woocommerce/cart-order-summary-coupon-form-block' === $block_name ) { + if ( in_array( + $block_name, + array( + 'woocommerce/all-products', + 'woocommerce/cart-order-summary-coupon-form-block', + ), + true + ) ) { return $content; }