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; }