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

Restaurants Tutorials

The Cheapest Food Delivery App for Restaurants Isn’t an App at All — It’s WooFood

When restaurant owners start looking for the cheapest food delivery app, they quickly discover a frustrating truth: most “cheap” delivery platforms aren’t cheap at all. They either take commissions, charge high monthly fees, lock you into their payment processors, or limit how much control you have over your own customer base. But what if the […]
December 1, 2025
Restaurants WooFood

Why “Free” GloriaFood Might Not Be The Best Long-Term Bet For Your Restaurant

When you’re building an online ordering system for your restaurant, it’s tempting to go for a “free” solution. That’s exactly what GloriaFood offers: a ready-to-go, easy-to-install WordPress plugin for online ordering, delivery, and reservations with no setup fees or commissions But “free” doesn’t always mean “best,” especially when you’re serious about owning your brand, your […]
December 1, 2025
Tutorials WooCommerce

How to Choose the Best Food Ordering System for Your Restaurant (And Why WooFood is the Ultimate Solution)

If you’re running a restaurant, café, or fast-food business in today’s digital age, offering online food ordering is no longer optional — it’s essential. Customers expect the convenience of browsing your menu, customizing their orders, and checking out seamlessly from their phone or computer. But with so many plugins and systems available, how do you choose the right […]
April 21, 2025