Everyday use for shop staff is in the guide. First setup is in Guide: 1. First Setup.
Basics
1. Requirements and How It Works with Takeout Menu
- WordPress 6.5 or later, PHP 7.4 or later.
- Tokurabo Takeout Menu is required (
Requires Plugins). WordPress does not let you activate Takeout Orders without it, and does not let you deactivate Takeout Menu while Takeout Orders is active. - Takeout Orders reads the menu, prices and taxes through Takeout Menu only. It does not connect to Square or any other outside service.
- Orders are saved in your WordPress database and sent by email. They are not sent to Square or to the register. Payment happens at the counter, where staff ring up the order in the register as usual.
- No page or shortcode is needed. The cart and the order form open over the current page. The cart button appears on every page of the site while the cart has items.
Settings
2. All Settings
The admin pages are under Takeout Menu in the admin menu, and only administrators (manage_options) can open them.
Takeout Menu > Order settings
| Section | Setting | Notes |
|---|---|---|
| Taking orders | Stop taking orders / Resume taking orders | Works when clicked (separate from Save Changes). The menu stays on the site. The "+" and Add to cart disappear, the cart shows the message instead of Checkout, and the server refuses new orders. |
| Message while paused | Shown to customers while paused. Empty = "We are not taking online orders right now. Please try again later." | |
| Pickup times | Preparation time | 0–240 minutes. Default 30. |
| Time slots | Every 5, 10, 15, 20, 30 or 60 minutes. Default 15. Aligned to the clock (10:00, 10:15 ...). | |
| Days ahead | 1–60 days, counting today. Default 7. | |
| Daylight saving time | Shown only if the store's time zone changes clocks within the next year. See 3. | |
| Special days | Date / Status (Closed, Special hours) / Hours | Come before the usual hours. Past days are removed when you save. If the same date appears twice, the last one is used. |
| Checkout | Notice to customers | Shown at the top of the order form. Line breaks, <strong> and <a> only. |
| Order emails | Shop name | Shown as the sender name, and in the subject and body of order emails. Empty = site title. |
| From email address | The sender of order emails, and where new orders are sent. Up to 5 addresses, separated by commas (the first one is the sender). Empty = site admin email. If an address is not valid, nothing is saved. See 4. | |
| Send test email | Sends a test email to all the addresses in From email address, with the saved settings. | |
| Order numbers | Prefix | Letters and numbers, up to 10. Lowercase letters become uppercase, and other characters are removed. Default TO. |
| Order history | Keep orders for ... days after pickup | 0 = keep forever (default). Up to 3650. |
| Styles | Use the plugin styles | On by default. Turn it off to write your own CSS for the cart and the order form. See 8. |
Takeout Menu > Availability
Uncheck an item to stop taking orders for it. It shows as "Sold out" until checked again, and syncing does not change it. It works per item (not per variation or option). To stop an option, mark it sold out in Square.
Pickup times
3. How Pickup Times Are Calculated
- Store hours: the business hours from the register (Square location hours, via Takeout Menu 0.2.0 or later. Some regions or POS apps have no place to set them). If there are none, there are no store hours (the hours of other menus are not used).
- Pickup times: times when at least one menu is served. Menus with no hours follow the store hours. If there are no store hours either, items only in those menus are arranged by the shop (see below).
- Special days come first. A closed day cannot be chosen. Special hours replace the store hours for that day (menus with their own hours are limited to the overlap).
- Today starts from now plus the Preparation time. "ASAP" is offered when today is open. An end time is included (until 9:00 pm means 9:00 pm can be chosen). Hours past midnight continue into the next day.
- If an item in the cart is not served at the chosen time, the form lists it with its usual hours, and Place order is disabled.
Times are counted in the store's time zone (the one Takeout Menu saved from the register), or the WordPress time zone if there is none. Times are shown in the WordPress time format (Settings > General).
Arranged by the shop: if the cart has an item that is only in menus with no hours, and the register has no business hours, the customer does not choose a time. The whole order is marked To be arranged, and the shop contacts the customer. Order settings explains this under Pickup times. If no menu has hours at all, every order works this way and a yellow notice is shown. Set menu hours in the register to switch back (at the next sync).
Daylight saving time: times skipped when clocks go forward are never offered. The repeated hour when clocks go back is not offered unless you turn it on, because one time could mean two different moments.
The server checks the pickup time again when the order arrives. If it is no longer available, the customer is asked to choose again.
Orders
4. Orders, Order Numbers and Emails
What the server checks
The browser sends only IDs, options and quantities, never prices. The server rebuilds the order from the current menu: items and options must be on a shown menu and not sold out, required options and limits are checked, and prices are calculated the same way as on the menu page (tax included or before tax, following the Takeout Menu setting). Items with variable prices make the subtotal "Price varies".
Order numbers
Prefix + month and day + 4 random characters (0–9 and A–F), for example TO-1017-A3F9.
Emails
Plain text emails sent with wp_mail(), in the site language.
| To | Subject | Reply-To | |
|---|---|---|---|
| To the customer | Customer email | Order received: TO-1015-A3F9 - shop name | The first address in From email address |
| To the shop | From email address (all) | New order TO-1015-A3F9 - pickup Oct 17 12:00 pm | Customer email |
The sender (From) is "shop name <the first address in From email address>" (Shop name and From email address in Order settings. If empty, the site title and the site admin email). If an SMTP plugin is set to force its own sender, its settings are used instead. The subtotal is followed by "(tax incl.)" or "(before tax)", matching how Takeout Menu shows prices (the same in the cart and the Orders list). In customer emails and the cart, it is labeled "Estimated subtotal", because the register may round tax differently by a cent. The final price is calculated at the counter. If emails land in spam or are not sent, use an SMTP plugin (see the guide for how to set one up). If sending fails, the order is still saved, and the customer sees "We could not send the confirmation email. Please note your order number."
Records
5. Order List, CSV and Order History
- Orders: the standard WordPress list table. 20 per page. Search by order number, name, email or phone. Sort by Pickup or Received. Delete one or many (Delete permanently). There is no trash and no order status. The top of the list shows how long orders are kept (Keep orders for).
- Export CSV: one row per item. It keeps the current search. UTF-8 with BOM (opens in Excel). Values starting with
= + - @are escaped. The file is not saved on the server. - CSV columns: Order, Received, Pickup, ASAP, Name, Email, Phone, Order notes, Item, Variation, Options, Notes, Quantity, Unit price, Line total, Order subtotal, Currency, Prices.
- Order history: once a day (WP-Cron), orders whose pickup time is older than the set number of days are deleted, including customer details. It uses the pickup time, so future reservations are kept. WP-Cron runs when someone visits the site, so it can be a little late.
Privacy
6. Customer Data and Privacy
- Saved with each order: name, email, phone, and the user ID if the customer is logged in.
- The customer's name, email and phone are remembered in the customer's own browser (localStorage) for next time. The cart is also kept there.
- For spam protection, a hashed form of the IP address and email address is kept for up to one hour.
- Nothing is sent to outside services.
- Tools > Export Personal Data includes Takeout Orders. Tools > Erase Personal Data replaces the name, email, phone and notes, and keeps the order number, items and prices as a sales record.
Add these points to your site's privacy policy as needed.
Security
7. Spam Protection
- Up to 5 orders in 10 minutes from the same IP address, and up to 5 orders in an hour to the same email address. Change with the
tokurabo_takeout_orders_rate_limitfilter (for example, when many customers share the shop Wi-Fi). - A hidden field catches simple bots.
- Each submission has a key. If the same key arrives again (double click, dropped connection), the first order is returned and no second order is made.
- There is no CAPTCHA.
Page cache plugins
Pickup times are loaded each time the order form opens (Cache-Control: no-store), so cached pages still offer current times. The REST nonce is sent only for logged-in users, so cached pages do not break orders.
Design
8. Changing the Look
The cart and the order form take their colors and fonts from the menu (or the page). There are no color settings. To change more, write your own CSS. Class names start with takeout-orders-.
/* Move the cart button */
:root {
--takeout-orders-cart-right: 24px;
--takeout-orders-cart-bottom: 24px;
}
Writing all the CSS yourself
Turn off Use the plugin styles in Order settings > Styles. The plugin then stops loading its stylesheet for the cart button, the cart, the order form, the quantity and Add to cart in the item window, and the "+" on the menu. The admin pages keep their styles.
A small base stylesheet is still loaded. It hides the hidden field that catches bots (if customers can see it and fill it in, their orders are refused), and sets icon sizes and a few small rules. Everything except the bot field has zero specificity (:where()), so your own CSS overrides it as is.
This setting is separate from the one in Takeout Menu. To turn off the styles in code, use the tokurabo_takeout_orders_load_css filter.
Developers
9. For Developers: Hooks and REST API
Filters
| Filter | What it changes |
|---|---|
tokurabo_takeout_orders_store_hours | Store hours by day of the week (1 = Monday ... 7 = Sunday => list of periods). |
tokurabo_takeout_orders_prep_minutes | Preparation time in minutes, used for the earliest time and ASAP. The saved setting is not changed. |
tokurabo_takeout_orders_open_periods | Periods that can be chosen on a given day (periods, date). |
tokurabo_takeout_orders_pickup_message | A short message shown under the Pickup time heading. Empty by default. |
tokurabo_takeout_orders_checkout_fields | Add fields to the end of the order form: key, label, type (text / textarea), required, maxlength, placeholder. One per order. |
tokurabo_takeout_orders_check_fields | Check the added fields ([ { key, label, value } ]). Return a WP_Error to refuse the order with its message. |
tokurabo_takeout_orders_email | Each email before sending: kind (customer / store), to, subject, body, headers, and the order. |
tokurabo_takeout_orders_rate_limit | [ 'ip' => [ 5, 600 ], 'email' => [ 5, 3600 ] ]. Set a count to 0 to turn it off. |
tokurabo_takeout_orders_load_css | Return false to stop loading the plugin styles, the same as turning off Use the plugin styles. |
Separate carts for add-on plugins
An add-on plugin can make its own cart, with its own items and pickup times, next to the usual one. The cart button and the usual cart are not affected.
- In the browser,
window.tokuraboTakeoutOrdersCreateCart( options )makes a cart. The options set where the cart is stored, its data, and the REST endpoints for the menu, pickup times and orders. It sends acartname with the order. tokurabo_takeout_orders_cart_menusandtokurabo_takeout_orders_cart_choices(filters): give the menus and the pickup times for acartname. If either isnull(for example, the add-on is deactivated), the order is refused.tokurabo_takeout_orders_check_order(filter): runs before an order from a separate cart is saved, with the checked items and pickup time. Return aWP_Errorto refuse the order. It does not run for the usual cart.- Customer details, spam protection, pausing, order numbers, saving and emails work the same as for the usual cart. The
cartname is not saved with the order. It is passed totokurabo_takeout_orders_order_placed.
Actions
tokurabo_takeout_orders_order_placed: after an order is saved, before the emails. Receives the order.tokurabo_takeout_orders_orders_deleted: after orders are deleted from the list. Receives the deleted IDs.
REST API (namespace tokurabo-takeout-orders/v1)
GET /menu: the shown menu, for pages without a menu (used by the cart).GET /pickup: the pickup times that can be chosen now.POST /orders: place an order. Errors return JSON with acodestarting withtokurabo_takeout_orders_.
Database tables
{prefix}tokurabo_takeout_orders (one row per order) and {prefix}tokurabo_takeout_order_items (one row per item). Names and prices are copied at the time of the order.
Help
10. Troubleshooting and Logs
| What happens | What to check |
|---|---|
| Emails do not arrive | Spam folder, then an SMTP plugin (guide). Check the log for the sending error. |
| "Could not load pickup times." | The REST API is blocked (security plugin, server rule) or the site returns an error. Open /wp-json/tokurabo-takeout-orders/v1/pickup. |
| Times look shifted by some hours | The store time zone in Square and Settings > General > Timezone. |
| "Too many orders. Please wait a few minutes and try again." | The rate limit. Many people on the same network? Use the tokurabo_takeout_orders_rate_limit filter. |
| Old orders are not deleted | WP-Cron is disabled or the site has few visitors. Run wp-cron.php from the server's cron. |
Detailed errors are written to wp-content/debug.log only when WP_DEBUG_LOG is enabled in wp-config.php.
When you delete the plugin
Deactivating keeps everything. Deleting the plugin removes all orders (both tables), settings, and scheduled tasks. Export the orders to CSV first. The plugins list has an Export orders link next to Deactivate. Takeout Menu and its settings are not affected.
Download
Get Takeout Orders for Free
Tokurabo Takeout Orders is free on WordPress.org.
Download from WordPress.orgYou can also install it from Plugins > Add Plugin in your WordPress dashboard.
Add-on
When Orders Pick Up
A paid plugin that works on top of Takeout Orders.
Takeout Order Board Paid
Turns the orders from Takeout Orders into an order board on your shop's tablet. Move each order along with one tap, and the customer gets an email. Busy mode, seasonal pre-orders and an order history are included too.
See Takeout Order Board