From c02c44cf4eac2daa0663615415801dbdc8fd87e0 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 5 Jun 2018 20:04:30 -0600 Subject: [PATCH] checkout/form-coupon.php - Use no-js class to hide JS only forms/content - Other changes in syntax Reference: 9b6f3f6f9b1a299157c4b5ba3b31843fc78b8d08 --- woocommerce/checkout/form-coupon.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/woocommerce/checkout/form-coupon.php b/woocommerce/checkout/form-coupon.php index f45d0bb..fb2bc68 100644 --- a/woocommerce/checkout/form-coupon.php +++ b/woocommerce/checkout/form-coupon.php @@ -10,27 +10,25 @@ * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * - * @see https://docs.woocommerce.com/document/template-structure/ - * @author WooThemes + * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates - * @version 3.3.0 + * @version 3.4.0 */ -if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly. -} +defined( 'ABSPATH' ) || exit; -if ( ! wc_coupons_enabled() ) { +if ( ! wc_coupons_enabled() || ! empty( WC()->cart->applied_coupons ) ) { // @codingStandardsIgnoreLine. return; } -if ( empty( WC()->cart->applied_coupons ) ) { - $info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'understrap' ) . ' ' . __( 'Click here to enter your code', 'understrap' ) . '' ); - wc_print_notice( $info_message, 'notice' ); -} ?> +
+ ' . __( 'Click here to enter your code', 'understrap' ) . '' ), 'notice' ); ?> +
-