From bb33ce4009a32afa9b3fc9e7f3be181b4ccc93b1 Mon Sep 17 00:00:00 2001 From: Raluca Stan Date: Tue, 12 Apr 2022 12:04:30 +0200 Subject: [PATCH] Revert "Hide coupon form div from inner blocks if coubons are not enabled" This reverts commit ab09021b923fad4218b3016e47760ad07f6bc960. --- src/BlockTypes/Cart.php | 7 +++---- src/BlockTypes/Checkout.php | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/BlockTypes/Cart.php b/src/BlockTypes/Cart.php index 30ee35815d0..395699250e0 100644 --- a/src/BlockTypes/Cart.php +++ b/src/BlockTypes/Cart.php @@ -118,14 +118,13 @@ protected function render( $attributes, $content ) { * Cart i3 added inner blocks for Order summary. We need to add them to Cart i2 templates. * The order needs to match the order in which these blocks were registered. */ - $coupons_enabled = wc_coupons_enabled(); $order_summary_with_inner_blocks = '$0
-
' . - ( $coupons_enabled ? '
' : '' ) . - '
+
+
+
'; // Order summary subtotal block was added in i3, so we search for it to see if we have a Cart i2 template. diff --git a/src/BlockTypes/Checkout.php b/src/BlockTypes/Checkout.php index 7138d241806..6eb828b0791 100644 --- a/src/BlockTypes/Checkout.php +++ b/src/BlockTypes/Checkout.php @@ -118,14 +118,13 @@ protected function render( $attributes, $content ) { * We need to add them to Checkout i2 templates. * The order needs to match the order in which these blocks were registered. */ - $coupons_enabled = wc_coupons_enabled(); $order_summary_with_inner_blocks = '$0
-
' . - ( $coupons_enabled ? '
' : '' ) . - '
+
+
+
'; // Order summary subtotal block was added in i3, so we search for it to see if we have a Checkout i2 template.