Plugin reference
Blocks, shortcodes, template overrides, filters and actions.
Everything the plugin puts on a page is available three ways — a block, a shortcode, or a template you can override in your theme — so it works with the block editor, classic themes and page builders alike.
Blocks and shortcodes
| Block | Shortcode | What it shows |
|---|---|---|
| Positack Menu | [positack_menu] | The venue's menu, rendered as real HTML so search engines index it. |
| Positack Ordering | [positack_order] | The page a table's QR code opens: menu, basket and checkout for that table. |
| Positack Account | [positack_account] | Diner sign-in, order history, loyalty points and wallet balance. |
[positack_menu] options
| Option | Values | Effect |
|---|---|---|
category | a category name | Show only that category (and anything inside it) — e.g. a Breakfast page. |
images | yes / no | Product photos. Defaults to the plugin setting. |
descriptions | yes / no | Product descriptions. Defaults to the plugin setting. |
dietary | yes / no | Dietary tags (vegan, gluten-free, …). Defaults to the plugin setting. |
prices | yes / no | Prices. On by default. |
search | yes / no | The search box above the menu. On by default. |
ordering | yes / no | Add buttons and a basket. Turn off for a menu on an About page. |
[positack_menu category="Breakfast" ordering="no"]Overriding templates
Copy any file from the plugin's templates/ folder into yourtheme/positack/ and edit the copy. The plugin always uses the theme's copy when one exists, and updates never overwrite it.
The templates are menu.php, order.php, order-no-table.php, order-status.php, basket.php, checkout.php and account.php. Keep every data-positack-* attribute you find in them — the ordering scripts find their place in the page by those attributes.
The basket and checkout are added by the shortcode, not by menu.php, so an overridden menu template can never leave a diner unable to order.
Filters
positack_site_key— supply the key fromwp-config.phpinstead of the database, e.g. to keep it out of database backups.positack_money(formatted, value, symbol) — how prices are written. It shapes the HTML PHP renders; the ordering script rewrites prices from the live menu using the site locale's separators, so a filter that changes more than separators should come with an override ofmenu.php.positack_rate_limit(per_minute, bucket, ip) — the per-minute ceiling for each kind of call. The buckets and defaults areorder60,checkout30,cancel30,auth20 andread600. They are sized for a whole restaurant, because every phone on a venue's WiFi shares one public address.positack_guest_base— the address diner-facing calls are sent to. Only needed when developing against a staging copy of PosiTack.
add_filter( 'positack_site_key', fn () => POSITACK_SITE_KEY );Actions
positack_order_placed(order, table) — after PosiTack accepts an order. For analytics, a CRM, or the site's own confirmation email.positack_menu_changed(payload) — when PosiTack reports the menu changed. It fires before the site downloads the new menu, so do not purge a page cache from here — a page rebuilt in that moment would cache the old prices again. Use it for logging or to notify another system.
add_action( 'positack_order_placed', function ( array $order, string $table ) {
// e.g. send the order to the venue's CRM
}, 10, 2 );Reading the menu in your own code
A custom template can read the synced menu directly — no network call is made:
Positack_Menu_Repository::tree(); // categories with their items
Positack_Menu_Repository::items(); // every item, flat
Positack_Menu_Repository::item( $id ); // one item
Positack_Menu_Repository::search( 'burger' );What the plugin will never do
- Calculate a price or a total. PosiTack prices every order with the same service the till uses. The basket holds item ids and quantities only; anything shown before checkout is labelled an estimate.
- Show the site key to a browser. It is only ever sent server to server.
- Handle card details. The diner pays on the venue's own payment gateway and comes back to the site afterwards.
