78
I wanted to do something different on my own checkout page, and change the default “Have a Coupon?” message. Thankfully, WooCommerce gives us a filter we can use to accomplish anything we like – such as adding a FontAwesome icon or changing the text string completely!
PHP Snippet: Translate “Have a Coupon?” Message @ WooCommerce Checkout
/**
* @snippet Edit "Have a Coupon" message @ WooCommerce Checkout
* @how-to Get tutoraspire.com FREE
* @author Tutor Aspire
* @compatible WooCommerce 5
* @donate $9 https://tutoraspire.com
*/
add_filter( 'woocommerce_checkout_coupon_message', 'tutoraspire_have_coupon_message');
function tutoraspire_have_coupon_message() {
return ' Have a coupon? Click here to enter your discount code';
}