WPSlash Licences

Change the Default Select Button Text in FoodMaster

How to Change the Default “Select” Button Text in WooFood – code snippet guide from WPSlash
Published
Updated
Reading time
1 minutes
Written by
WPSlash team

This snippet changes the default “Select” button text on FoodMaster (formerly WooFood) product listings. Add it to your child theme’s functions.php file, or to a code snippets plugin.

Change the button text

The function returns the new label. In the example it returns “Order Now”, so replace that with the text you want on the button. Other labels the original post suggests are “Add to Order”, “Get Your Meal”, “Place Order” and “Get It Now”.

Updated for current FoodMaster versions: the code below uses the foodmaster_ names. Older installs that still run WooFood used the woofood_ prefix, so on those change foodmaster_ back to woofood_.

Code
add_filter("foodmaster_product_add_to_cart_text_ajax", "wpslash_tweak_change_default_select_button_text", 10, 1);

function wpslash_tweak_change_default_select_button_text($default)
{
	return "Order Now";
}

How the snippet works

  • It hooks into the foodmaster_product_add_to_cart_text_ajax filter.
  • The function wpslash_tweak_change_default_select_button_text() returns “Order Now” in place of the default text.
  • Change the returned string to any label you prefer, such as “Add to Order”.

Before you start

  • Use the same button text across your whole menu.
  • Test the change on a staging site before you use it on the live shop.

To check it worked, open a product listing on the front end and look at the button. It should show your new text on both desktop and mobile.

FoodMaster (formerly WooFood)

The snippet uses a filter from FoodMaster (formerly WooFood), the restaurant ordering plugin for WooCommerce. You can get FoodMaster here.

FoodMasterRestaurant ordering for WooCommerce: delivery, pickup and dine-in, a POS for counter and phone orders, a kitchen display and automatic ticket printing. Used by 10,000+ restaurants.$499 for one site
All guides

FoodMaster (formerly WooFood)12 min read

Best Store Address Setup for Pickup

Compare single-address, multi-location, and directions-first pickup setups to reduce wrong-door visits and simplify checkout.

The plugins these guides are about

FoodMaster for restaurants, courier vouchers for the Greek market, marketplace sync and store tools, all for WooCommerce.

Browse plugins30-day money-back on every plugin