Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Add Products Name is message › Reply To: Add Products Name is message
December 29, 2016 at 8:20 pm
#972
Soft79
Keymaster
You can achieve that by using the following snippet in functions.php:
add_filter('woocommerce_coupon_error', 'my_custom_woocommerce_coupon_error_message', 999, 3 );
function my_custom_woocommerce_coupon_error_message( $err, $err_code, $coupon ) {
if ( $coupon->code == 'MY_COUPON_CODE' ) {
$err = 'MY ERROR MESSAGE';
}
return $err;
}
Replace MY_COUPON_CODE with your coupon code and MY ERROR MESSAGE with the message you would like to show.