Skip to content

Instantly share code, notes, and snippets.

View GarrettSYHampton's full-sized avatar
💪
Currently Developing

Garrett S.Y. Hampton GarrettSYHampton

💪
Currently Developing
View GitHub Profile
@maxrice
maxrice / wc-rename-checkout-coupon-field.php
Last active July 5, 2023 19:34
WooCommerce - rename the "Have a Coupon?" message and "Apply Coupon" field on the checkout
<?php
// rename the "Have a Coupon?" message on the checkout page
function woocommerce_rename_coupon_message_on_checkout() {
return 'Have a Promo Code?' . ' <a href="#" class="showcoupon">' . __( 'Click here to enter your code', 'woocommerce' ) . '</a>';
}
add_filter( 'woocommerce_checkout_coupon_message', 'woocommerce_rename_coupon_message_on_checkout' );
// rename the coupon field on the checkout page