Contents
Shopping Lists — Plugixa Recipe
Shopping lists are per-user aggregated ingredient lists — built from one or many recipes, with check-off tracking and status (active, completed, archived).
Data model
Two tables:
wp_plugixarecipe_shopping_lists— per list: owner, name, status.wp_plugixarecipe_shopping_list_items— per line: recipe reference, ingredient name/quantity/unit,is_checkedflag, sort order.
Creating a shopping list
From the frontend
On any recipe page, click Add to shopping list. If no list exists, one is created with a default name (“Shopping list — 12 April”). The ingredients of the current recipe are appended.
From the admin
Navigate to Recipes → Shopping Lists → Add New. Build a list manually.
Managing a list
Open a list from Recipes → Shopping Lists. Each item shows:
- Quantity, unit, name (editable inline).
- A checkbox to mark “purchased” — updates
is_checked. - A trash icon to remove.
- A drag handle to reorder.
Actions at the top: Mark all / none purchased, Clear checked, Archive, Print.
Aggregating duplicate ingredients
When the same ingredient is added from multiple recipes (e.g., “2 cloves garlic” and “3 cloves garlic”), the plugin can merge them into a single line (5 cloves garlic) if they share the same normalized name + unit. This behavior is on by default; toggle it in Settings → Advanced → Shopping Lists.
Status workflow
| Status | Meaning |
|---|---|
active |
In-use list; shown in the menu |
completed |
All items checked or manually marked done |
archived |
Hidden from the default list; still searchable |
Permissions
- Each user sees only their own lists.
- Admins can see everyone’s lists from Recipes → Shopping Lists.
- Guests cannot use shopping lists — add-to-list buttons are hidden when not logged in (or trigger a sign-in prompt, configurable in Settings → Display).
REST endpoints
GET /wp-json/plugixarecipe/v1/shopping-lists
POST /wp-json/plugixarecipe/v1/shopping-lists
PATCH /wp-json/plugixarecipe/v1/shopping-lists/{id}
POST /wp-json/plugixarecipe/v1/shopping-lists/{id}/items
PATCH /wp-json/plugixarecipe/v1/shopping-lists/{id}/items/{itemId}
DELETE /wp-json/plugixarecipe/v1/shopping-lists/{id}/items/{itemId}
All endpoints require authentication (nonce for logged-in users; application passwords for external clients).