Only set zip/post codes should be accepted on checkout in custom ship method.
-
Hi all,
I have a site for a client who bakes and sells pizza. When a customer adds pizzas to the cart and then tries to checkout, and checks delivery, only a array of certain zip/post codes are accepted. However, on checkout you can now add any zip/post code. The order is passed anyway and no errors.
I’ve added my custom shipment class to functions.php in my theme and it looks like this: https://pastebin.com/08JvxAzg
I’ve copied a lot of code from Local Delivery, which comes with WooCommerce.
Is there another way of checking these codes and make sure that the customer has inputed anyone of them?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Only set zip/post codes should be accepted on checkout in custom ship method.’ is closed to new replies.