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:
Mike Jolley 2018-06-04 11:54:21 +01:00 committed by GitHub
commit 98c92f3246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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' );
}