add filter to toggle between coupon's discount amount and free shipping text
This commit is contained in:
parent
07bad6975f
commit
6fc7a2d7cc
|
@ -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() && ! apply_filters( 'woocommerce_coupon_show_discount_amount', ! empty( $amount ), $coupon ) ) {
|
||||
$discount_amount_html = __( 'Free shipping coupon', 'woocommerce' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue