WooCommerce how to validate postcode during checkout
-
Hi,
I just need some simple code on validating the users shipping postcode during checkout, ie if the postcode is not in the range specified then stop the user from placing order eg;
if postcode == (1000 || 1001 || …)
then return true;
else
alert(‘we do not deliver to your area..’);
disable the user from placing order
return falseWould this code be placed in functions.php of the child theme or in class-wp-checkout.php ?
Any help is much appreciated..
The topic ‘WooCommerce how to validate postcode during checkout’ is closed to new replies.