WPSlash

How to Redirect to Specific Page based on Availability Checker on WooFood Multistore

Monday April 13, 2020

Hi,

Here are two small snippets allows you to redirect the customer to the page url you want after available stores has been found using Availability Checker .

This snipper is useful if for example you have 4 locations and each location has independent menu and you want to use a different menu for each one.

So, after customer checking using the Availability Checker or Change his Address will redirected also automatically to the correct menu page.

The first snippet is to enable redirection

add_filter('woofood_multistore_redirect_after_store_found', 'wpslash_enable_availability_redirect');

function wpslash_enable_availability_redirect($bool)
{

return true;
}

The second snippet is to set the url we want for redirection depended on the available store we have . As you can see the second argument we have is $available_stores containing info about the stores Availability Checker found Available.

add_filter('woofood_multistore_redirect_url', 'wpslash_availability_redirect_url', 10, 2);

function wpslash_availability_redirect_url($page_url, $available_stores)
{
	if($available_stores["nearest_store_name"] =="Location 1")
	{
		$page_url ="https://yourwebsite.com/menupage1/";
	}
	elseif($available_stores["nearest_store_name"] =="Location 2")
	{
		$page_url ="https://yourwebsite.com/menupage2/";

	}
	return $page_url;
}

Leave a Comment

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

Related Articles

Tutorials

How to Set Up SMS and WhatsApp Order Notifications for Your WooCommerce Restaurant (2026)

Why SMS and WhatsApp Notifications Matter for Restaurant Orders A customer places an order on your <a href="https://www.wpslash.com/how-to-set-up-real-time-order-tracking-for-your-woocommerce-restaurant-website-2025-2/" title="How to Set Up Real-Time Order Tracking for Your <a href="https://www.wpslash.com/how-to-set-up-catering-and-large-group-orders-on-your-woocommerce-restaurant-website-2025/" title="How to Set Up Catering and Large Group Orders on Your WooCommerce Restaurant Website (2025)”>WooCommerce Restaurant Website (2025)”>restaurant website at 7:15 PM during the Friday rush. […]
May 3, 2026
Tutorials

How to Set Up Real-Time Order Tracking for Your WooCommerce Restaurant Website (2026)

Why Real-Time Order Tracking Matters for Restaurant Websites Picture this: a hungry customer places an order on your <a href="https://www.wpslash.com/how-to-build-a-customer-loyalty-program-for-your-wordpress-restaurant-website-2025/" title="How to Build a Customer Loyalty Program for Your <a href="https://www.wpslash.com/how-to-connect-your-wordpress-restaurant-website-to-doordash-uber-eats-grubhub-2025/" title="How to Connect Your WordPress <a href="https://www.wpslash.com/how-to-rank-your-restaurant-website-on-google-local-seo-for-wordpress-2025/" title="How to Rank Your Restaurant Website on Google: Local SEO for WordPress (2025)”>Restaurant Website to DoorDash, Uber […]
May 3, 2026
Tutorials

How to Set Up Catering and Large Group Orders on Your WooCommerce Restaurant Website (2026)

Why Catering and Large Group Orders Matter for Restaurant Revenue Most restaurant owners pour energy into optimizing their dine-in experience and individual delivery orders while overlooking a revenue channel that can transform their bottom line: catering. A single corporate lunch order for 30 people can equal what your dining room generates in an entire slow […]
May 2, 2026