WPSlash

How to Change Postal Code Checking to Prefix Only Checking on WooFood for WooCommerce

Friday March 27, 2020

The below hook will work for users using Postal Code Restrictions under Distance Restrictions on WooFood .

After using the below hook under postal codes must be added only the postal codes prefixes are available for delivery instead from the whole postal code.

Copy to your child theme functions.php to change the postal code checking to check only the prefix instead of whole postal code.

This is useful for locations like UK where postal codes are too many ands its difficult of adding one by one each postal code in full.

function change_to_prefix_postal_checking( $bool ) {
     return true;
 }
 add_filter( 'woofood_check_postal_prefixes', 'change_to_prefix_postal_checking', 10, 1 );

Leave a Comment

Your email address will not be published. Required fields are marked *

×

🔥 ONE DAY ONLY OFFER 🔥

Upgrade FoodMaster Today

Normally your license is limited to 1 Website.

Today only, get a LIFETIME Unlimited Websites License for just:
$499

✔ Unlimited Client Websites
✔ Unlimited Personal Projects
✔ Future Updates Included
✔ Save Hundreds on Additional Licenses

Offer Ends In: