Post types
dispense_product
| Property | Value |
|---|---|
| Key | dispense_product |
| Label | AIQ Ecommerce Product |
| Public | Yes |
| Has archive | Yes |
| Supports | Title, editor, thumbnail, custom fields |
| Menu | AIQ Ecommerce Products |
One post per product per venue. The same product synced from two venues is two posts.
dispense_venue
| Property | Value |
|---|---|
| Key | dispense_venue |
| Label | Venue |
| Public | Yes |
One post per venue. Its post_name is what appears in localized URLs.
Product fields
All stored as post meta on dispense_product, and registered as ACF fields so builders can read them.
| Field | Key | Type | Contains |
|---|---|---|---|
| Product ID | dispense_product_id |
string | The product's ID in AIQ Ecommerce |
| Price | dispense_product_price |
string | Price, formatted to two decimals |
| Sale Price | dispense_product_sale_price |
string | Discounted price, when one applies |
| Quantity | dispense_product_quantity |
string | Stock quantity |
| Image URL | dispense_product_image_url |
string | Product image, served from AIQ Ecommerce |
| Menu Link | dispense_product_menu_link |
string (URL) | The product's page on the hosted menu |
| Offer Details | dispense_product_offer |
string | Comma-separated offer names |
| Venue ID | dispense_venue_id |
int | The WordPress post ID of the venue |
Reading them
$price = get_post_meta($post_id, 'dispense_product_price', true);
$quantity = get_post_meta($post_id, 'dispense_product_quantity', true);
$image_url = get_post_meta($post_id, 'dispense_product_image_url', true);
// Or via ACF
$price = get_field('dispense_product_price', $post_id);
Notes
- There is no featured image. The image is a URL in
dispense_product_image_url. Nothing is written to the media library. - Prices are strings. Cast before arithmetic:
(float) $price. - Sale price is set when AIQ Ecommerce sends one directly, and when a percentage
SALEdiscount applies. A product with a sale price is also added to a Sale category term.
Taxonomies
All attached to dispense_product.
| Taxonomy | Key | URL slug | Hierarchical |
|---|---|---|---|
| Brand | dispense_brand |
brand |
Yes |
| Category | dispense_category |
categories |
Yes |
| Offer | dispense_offer |
offers (configurable) |
Yes |
| Terpenes | dispense_terpenes |
terpenes |
Yes |
| Cannabis Type | dispense_cannabis_type |
cannabis_type |
Yes |
| Venue | dispense_venue_tax |
dispense-venue |
Yes |
Querying by taxonomy
$products = new WP_Query([
'post_type' => 'dispense_product',
'tax_query' => [
'relation' => 'AND',
[
'taxonomy' => 'dispense_category',
'field' => 'slug',
'terms' => 'flower',
],
[
'taxonomy' => 'dispense_venue_tax',
'field' => 'slug',
'terms' => 'camden',
],
],
]);
Sorting by price
$products = new WP_Query([
'post_type' => 'dispense_product',
'orderby' => ['meta_value_num' => 'ASC', 'ID' => 'ASC'],
'meta_key' => 'dispense_product_price',
'meta_query' => [[
'key' => 'dispense_product_price',
'compare' => 'EXISTS',
]],
]);
The EXISTS clause keeps products with no price out of the ordering, where they would otherwise sort unpredictably.
Terpene term names
Raw terpene keys are mapped to readable names on import:
| Key | Term |
|---|---|
alphaPinene |
Alpha Pinene |
betaCaryophyllene |
Beta Caryophyllene |
betaEudesmol |
Beta Eudesmol |
betaMyrcene |
Beta Myrcene |
betaPinene |
Beta Pinene |
bisabolol |
Bisabolol |
caryophylleneOxide |
Caryophyllene Oxide |
guaiol |
Guaiol |
humulene |
Humulene |
limonene |
Limonene |
linalool |
Linalool |
ocimene |
Ocimene |
terpinene |
Terpinene |
terpinolene |
Terpinolene |
threeCarene |
Three Carene |
transNerolidol |
Trans Nerolidol |
Terpene terms are replaced on each sync rather than appended, so a product’s list always matches its current lab data.
Brand term meta
| Meta key | Contains |
|---|---|
dispense_brand_image_url |
The logo URL in use |
dispense_brand_api_image_url |
The logo URL from AIQ Ecommerce |
dispense_brand_image_id |
Attachment ID of a manually uploaded logo |
A manual upload wins. When dispense_brand_image_id is set, syncs update dispense_brand_api_image_url but leave dispense_brand_image_url alone.
Offer term meta
| Meta key | Contains |
|---|---|
dispense_offer_id |
The offer's ID in AIQ Ecommerce |
dispense_offer_type |
Offer type, e.g. SALE |
dispense_offer_deal_type |
Deal type, e.g. FLAT |
dispense_offer_reward_type |
Reward type, e.g. PERCENT |
dispense_offer_reward_value |
Reward amount |
dispense_offer_min_spend |
Minimum spend |
dispense_offer_description |
Description |
dispense_offer_image |
The offer's own image URL |
dispense_offer_order |
Display order |
dispense_offer_banner_large |
Desktop banner URL |
dispense_offer_banner_medium |
Tablet banner URL |
dispense_offer_banner_small |
Mobile banner URL |
dispense_offer_banner_link |
Banner click-through URL |
Banners attach through the banner’s link.offer in AIQ Ecommerce: a specific offer ID links it to that offer, and the value ALL applies one banner to every offer in the venue. A specific-offer banner takes priority over the venue-wide one.
When a banner is unlinked, the stored URLs are written as empty strings rather than left stale.
Plugin settings
All stored as WordPress options.
Licence
| Option | Default | Contains |
|---|---|---|
dispense_client_key |
'' |
The Client Key |
dispense_gateway_last_error |
(unset) | {code, message, at} of the last failure |
dispense_gateway_last_success |
0 |
Timestamp of the last successful call |
Sync
| Option | Default | Contains |
|---|---|---|
dispense_cron_interval |
thirty_minutes |
Sync frequency |
dispense_selected_venues |
[] |
AIQ Ecommerce venue IDs to sync |
dispense_products_last_sync_start |
0 |
Timestamp |
dispense_products_last_sync_complete |
0 |
Timestamp |
dispense_products_last_sync_stats |
[] |
The last run's result |
dispense_sync_debug_logs |
false |
Opt-in progress logging for the sync. No UI — set it in code. Failures are logged regardless. |
Display
| Option | Default | Contains |
|---|---|---|
dispense_mode |
full |
full or sync_only |
dispense_store_url_structure |
localized |
localized or universal |
dispense_base_slug |
menu |
URL base for venues |
dispense_offer_slug |
offers |
URL base for offers |
dispense_offer_index_page |
offers-listing |
Slug of the all-offers page |
dispense_products_per_page |
8 |
Products per archive page |
dispense_custom_css |
'' |
Custom CSS |
Cart and checkout
| Option | Default | Contains |
|---|---|---|
dispense_checkout_page_id |
0 |
The checkout page's post ID |
dispense_checkout_minimal_shell |
'1' |
'1' = minimal shell, '0' = theme layout |
dispense_cart_icon_url |
'' |
Image URL or raw SVG |
FacetWP
| Option | Default | Contains |
|---|---|---|
dispense_facetwp_brand_facet |
'' |
Brand facet name |
dispense_facetwp_category_facet |
'' |
Category facet name |
Removed in 1.1.0
These are deleted when a Client Key is saved:
| Option | Was |
|---|---|
dispense_api_key |
Raw AIQ Ecommerce API keys |
dispense_api_keys_by_venue |
Per-venue AIQ Ecommerce keys |
dispense_api_last_request |
A debug dump that contained the raw key |
Dispense_License::has_legacy_credentials() reports whether any remain.
Sync statistics
dispense_products_last_sync_stats on success:
[
'error' => false,
'total' => ['imported' => 12, 'updated' => 400, 'deleted' => 3],
'completed' => '2026-09-02 14:30:00',
]
On failure:
['error' => true, 'message' => 'The message from the failure']
REST API
Products are exposed at the standard endpoint, with an extra field:
GET /wp-json/wp/v2/dispense_product
GET /wp-json/wp/v2/dispense_product/{id}
{
"id": 123,
"title": { "rendered": "Blue Dream 3.5g" },
"dispense_product_details": {
"price": "45.00",
"quantity": "12",
"menu_link": "https://menu.example.com/product/blue-dream",
"offer": "20% Off Flower",
"image_url": "https://images.dispenseapp.com/...",
"sale_price": "36.00",
"id": "abc123"
}
}
Taxonomies are available at their own endpoints:
/wp-json/wp/v2/dispense_brand
/wp-json/wp/v2/dispense_category
/wp-json/wp/v2/dispense_offer
/wp-json/wp/v2/dispense_terpenes
/wp-json/wp/v2/dispense_cannabis_type
/wp-json/wp/v2/dispense_venue_tax
Page builder field keys
Elementor dynamic tags
| Tag | Key | Type |
|---|---|---|
| Price | dispense_product_price |
Text |
| Quantity | dispense_product_quantity |
Text |
| Menu Link | dispense_product_menu_link |
URL |
| Offer Details | dispense_product_offer |
Text |
| Product Sale Price | dispense_product_sale_price |
Text |
| Offer Name | dispense_offer_name |
Text |
| Offer Type | dispense_offer_type |
Text |
| Offer Image | dispense_offer_image |
Image |
Bricks — “AIQ Ecommerce Products” provider
dispense_product_price · dispense_product_quantity · dispense_product_menu_link · dispense_product_offer · dispense_product_image_url
Breakdance
AIQ Ecommerce Products: dispense_product_price · dispense_product_quantity · dispense_product_menu_link · dispense_product_offer · dispense_product_image_url · dispense_product_sale_price AIQ Ecommerce Brands: dispense_brand_image_url · dispense_brand_name AIQ Ecommerce Offers: dispense_offer_name · dispense_offer_type · dispense_offer_deal_type · dispense_offer_description · dispense_offer_image · dispense_offer_banner · dispense_offer_banner_large · dispense_offer_banner_medium · dispense_offer_banner_small · dispense_offer_banner_link
ACF virtual fields
Resolved from term meta at read time, on the offer taxonomy:
| Field | Resolves to |
|---|---|
dispense_offer_name_resolved |
Term name |
dispense_offer_type_resolved |
dispense_offer_type |
dispense_offer_image_resolved |
Offer image, falling back to the desktop banner |
dispense_offer_banner_resolved |
Banner: large → medium → small → offer image |
dispense_offer_description_resolved |
dispense_offer_description |
Useful queries
Products on sale:
new WP_Query([
'post_type' => 'dispense_product',
'meta_query' => [[
'key' => 'dispense_product_sale_price',
'compare' => 'EXISTS',
]],
]);
In stock only:
new WP_Query([
'post_type' => 'dispense_product',
'meta_query' => [[
'key' => 'dispense_product_quantity',
'value' => 0,
'compare' => '>',
'type' => 'NUMERIC',
]],
]);
One venue’s products, by AIQ Ecommerce venue ID:
$venue_posts = get_posts([
'post_type' => 'dispense_venue',
'numberposts' => 1,
'fields' => 'ids',
'meta_query' => [[
'key' => 'dispense_venue_id',
'value' => 'YOUR-AIQ-Ecommerce-VENUE-ID',
]],
]);
if ($venue_posts) {
new WP_Query([
'post_type' => 'dispense_product',
'meta_query' => [[
'key' => 'dispense_venue_id',
'value' => $venue_posts[0], // the WP post ID
]],
]);
}
A product by its AIQ Ecommerce ID:
$posts = get_posts([
'post_type' => 'dispense_product',
'numberposts' => 1,
'meta_query' => [[
'key' => 'dispense_product_id',
'value' => 'abc123',
]],
]);