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 *

Related Articles

FoodMaster (formerly WooFood)

How to Set Up Time Slot-Based Ordering for Your WooCommerce Restaurant: Configurable Pickup and Delivery Time Slots, Slot Capacity Limits, and Preventing Order Overload During Peak Hours (Complete Guide)

Why Time Slot-Based Ordering Is Essential for Restaurant Websites Picture this: it’s Friday evening, and your online ordering system just accepted 47 orders in the span of 20 minutes. Your kitchen crew can realistically handle 15 orders per half hour. The result? Delivery times balloon from 30 minutes to over 90, customers start calling to […]
April 15, 2026
Tutorials

How to Set Up Stripe, PayPal, and Square Payment Gateways for Your WooCommerce Restaurant Ordering System: Step-by-Step Configuration, Transaction Fees Comparison, and Optimizing Checkout for Faster Food Orders (Complete Guide)

Why Payment Gateway Choice Matters for Restaurant Websites A customer is hungry, they’ve spent three minutes building the perfect pad thai order with extra peanuts and a side of spring rolls, and they hit “Checkout.” If the next screen loads slowly, asks them to create an account, or doesn’t support their preferred payment method, that […]
April 14, 2026
FoodMaster (formerly WooFood)

How to Set Up a Catering and Large Group Order System on Your WooCommerce Restaurant Website: Custom Menus, Minimum Order Requirements, Scheduled Delivery Windows, and Tiered Pricing for Events and Corporate Orders (Complete Guide)

Why Your Restaurant Needs a Dedicated Catering Order System Online Catering revenue in the United States reached an estimated $66.5 billion in 2023 according to the Catering Industry Association, and a significant portion of that spend is shifting online. Corporate clients, event planners, and families organizing celebrations increasingly expect to browse menus, customize orders, and […]
April 14, 2026