MainWP Community

Change the remove coupon text in WooCommerce

Change the remove coupon text in WooCommerce on your child site.

Snippet Type

Execute on Child Sites

Snippet

function filter_woocommerce_cart_totals_coupon_html( $coupon_html, $coupon, $discount_amount_html ) {
    // Change text
    $coupon_html = str_replace( '[Remove]', '[Remove & Re-Calculate]', $coupon_html );

    return $coupon_html;
}
add_filter( 'woocommerce_cart_totals_coupon_html', 'filter_woocommerce_cart_totals_coupon_html', 10, 3 );
1 Like