Merge pull request #20334 from crstauf/pr/filter-free-shipping-coupon-html
More informative coupon label for coupons with discount and free shipping
This commit is contained in:
commit
98c92f3246
|
@ -280,7 +280,7 @@ function wc_cart_totals_coupon_html( $coupon ) {
|
|||
$amount = WC()->cart->get_coupon_discount_amount( $coupon->get_code(), WC()->cart->display_cart_ex_tax );
|
||||
$discount_amount_html = '-' . wc_price( $amount );
|
||||
|
||||
if ( $coupon->get_free_shipping() ) {
|
||||
if ( $coupon->get_free_shipping() && empty( $amount ) ) {
|
||||
$discount_amount_html = __( 'Free shipping coupon', 'woocommerce' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue