If coupon contains discount as well as free shipping add free shipping in brackets behind value
This commit is contained in:
parent
c68b8faa99
commit
dce5bc2f0b
|
@ -281,7 +281,11 @@ function wc_cart_totals_coupon_html( $coupon ) {
|
|||
$discount_amount_html = '-' . wc_price( $amount );
|
||||
|
||||
if ( $coupon->get_free_shipping() ) {
|
||||
$discount_amount_html = __( 'Free shipping coupon', 'woocommerce' );
|
||||
if ( empty( $amount ) ) {
|
||||
$discount_amount_html = __( 'Free shipping coupon', 'woocommerce' );
|
||||
} else {
|
||||
$discount_amount_html .= __( ' (with free shipping)', 'woocommerce' );
|
||||
}
|
||||
}
|
||||
|
||||
$discount_amount_html = apply_filters( 'woocommerce_coupon_discount_amount_html', $discount_amount_html, $coupon );
|
||||
|
|
Loading…
Reference in New Issue