RestroPress – Inventory
On this page
RestroPress - Inventory adds stock tracking to menu items and add-on items. You enter a stock quantity, the extension subtracts it as orders come in, marks the item "Sold Out" when it reaches zero, blocks carts that ask for more than is left, and can email you when stock runs low. It is for restaurants that prepare a limited quantity of some dishes.
Requirements#
- RestroPress (free plugin) 3.3 or newer, as stated in the 1.4.0 changelog. The extension relies on the core availability toggle and on the menu item editor's
rpress_fooditem_section_after_pricinghook. If RestroPress is not active it shows an admin notice and deactivates itself. - Tested up to WordPress 7.1 according to the readme.
Installation#
- Go to Plugins › Add New › Upload Plugin, choose the ZIP file and select Install Now.
- Select Activate Plugin.
- Use the Settings link on the Plugins screen, or open RestroPress › Settings › General › Inventory.
The plugin has no licence field and no update code of its own, so there is nothing to enter under RestroPress › Settings › Licenses.
Settings#
Settings are in RestroPress › Settings › General › Inventory, under "Inventory Settings".

| Setting | What it does | Default |
|---|---|---|
| Enable Stock | Turns stock management on. Nothing else in the extension (stock field, stock column, checkout checks, stock deduction) works until this is ticked. | Off |
| Stock Threshold Value | Stock at or below this number counts as "running low". Used for the low-stock email, and shown as help text under the stock field. Does not block ordering by itself. | 5 |
| Low Stock Notification | When ticked, an email is sent to the store email address when an order brings an item's stock to the threshold or below. | Off |
| Out of Stock Button Text | Text shown in place of the add button when an item is out of stock. | Empty, which shows "Sold Out" |
| Return to Stock | When ticked, stock is added back when an order is changed to Cancelled. This happens once per order. | Off |
| Disable Empty Stock Items | When ticked, an item with no stock value is treated as out of stock. You must enter a stock value for every item you want to sell. | Off |
| Enable Quick Stock Setting for addon | Adds an "Availibility" toggle column to the add-on list so you can switch an add-on item on or off quickly. | Off |
| Add stock option in addon | Adds a Stock field and a Stock column for add-on items, and checks add-on stock at checkout. | Off |
| Disable Food Ordering | Stops customers adding items to the cart. All items are treated as unavailable and the storefront (the .restropress wrapper) is shown in greyscale. Use it to close ordering quickly. | Off |
How it works#
Setting stock on a menu item#
With "Enable Stock" ticked, the menu item editor shows an "Inventory" section with a "Stock quantity" field. The help text says that at 0 the item is marked Sold Out, and shows the threshold when one is set. The value is saved as a whole number (negative values are not kept). Saving the editor with this field left blank stores 0, which marks the item Sold Out, so only open and save items you intend to track or fill in a quantity. The menu item list gets a "Stock" column, and a Stock field in Quick Edit.

- An item that has never had a stock value saved is treated as untracked and stays orderable, unless "Disable Empty Stock Items" is ticked.
- Availability (the on/off toggle for an item) comes from RestroPress core and is stored in the
rp_stock_statusmeta. The extension adds bulk actions on the menu item list, Mark Unavailable and Mark Available, plus a filter drop-down ("Show all Items") to list items by that status.
Add-on items#
With "Add stock option in addon" ticked, a child add-on item gets a "Stock" field on its edit screen ("Quantity of this add-on item"), a Stock column and a Quick Edit field. Add-on stock applies to child add-on items only, not the parent Add-on Group.
On the storefront#
- An item whose stock is 0 (or unavailable) cannot be ordered and shows the Out of Stock button text.
- An add-on at stock 0 is greyed out and not clickable; an add-on switched off with the toggle is shown in red and not clickable.
At checkout#
- When the customer proceeds to checkout, every cart line is checked, with quantities of the same item summed. A sold-out item gives "[item] is currently Out of Stock." and an over-ordered item gives "[item] is Low on Stock. You can add maximum of N to your cart."
- On order submission, the same checks run again for items and, when add-on stock is on, for add-ons ("... is currently Out of Stock." and "... is Low on Stock. Only N left now.").
- When an order is saved in Pending status, stock is subtracted for each item and add-on, never below 0. This happens once per order.
- With "Return to Stock" ticked, a Cancelled order adds the ordered quantities back (once per order, numerically tracked items only).
Low stock email#
The email is sent to the RestroPress "From email" setting (falling back to the WordPress admin email), with the subject "Low stock notification for [item]" and the heading "Low Stock Notice".
Developer reference#
| Hook | Type | Parameters | Purpose |
|---|---|---|---|
rpress_inventory_options | filter | $stock_options (the rpress_settings array) | Adjust the settings the extension reads, once when it loads. |
restropress_stock_field_label | filter | $label | Change the "Stock quantity" label in the editor. |
The extension also uses these core hooks: rpress_is_orderable, rpress_not_available, rpress_proceed_checkout_page, rpress_proceed_checkout, rpress_checkout_error_checks, rpress_payment_saved, rpress_update_order_status and rp_food_item_list_extra_classes. It registers one AJAX action, rpress_inventory_update_stock_status (nonce rpi_stock_status_nonce), which toggles add-on availability.
Data is stored as post meta rp_item_stock on menu items, term meta _stock and rp_addon_stock_status on add-on terms, and order meta _rp_stock_reduced and _rp_stock_restored.
Example: change the label of the stock field.
add_filter( 'restropress_stock_field_label', function () {
return 'Portions left today';
} );
Troubleshooting#
- An item became Sold Out after you edited it. Saving the editor with the Stock quantity field blank stores 0. Enter the quantity before saving.
- No stock field in the menu item editor. "Enable Stock" is not ticked, or RestroPress is older than 3.3.
- An item can still be ordered at stock 0. Stock 0 is only recognised when the value is saved as a number. An item with no saved stock value is untracked unless "Disable Empty Stock Items" is ticked.
- Everything shows in greyscale and cannot be ordered. "Disable Food Ordering" is ticked.
- Stock did not return after cancelling. "Return to Stock" must be ticked, and the extension returns stock only once per order and only for items with a numeric stock.
- No low-stock email. Both "Low Stock Notification" and a non-empty "Stock Threshold Value" are required, and the email goes to the RestroPress From email address.
- Add-on stock not enforced. "Add stock option in addon" must be ticked, and an add-on with an empty stock value is treated as out of stock at order submission.
Changelog highlights#
- 1.4.1: every cart item is validated at "Proceed to Checkout"; stock is decremented at most once per payment and restored at most once per cancellation; stock can no longer go negative; the availability filter drop-down is registered.
- 1.4.0: requires RestroPress 3.3+; AJAX and save handlers hardened with nonces and capability checks; the food item quick-toggle setting was removed in favour of the core Availability column; the stock field moved into the editor's Inventory section.
- 1.3.3: required-plugin validation fix.
