product.meta — Displays a product custom field#
This placeholder is included in the free version of ShopMagic. It requires an event that provides product data, such as Product published or Product updated. It can also be used with the Review Published event provided by ShopMagic Review Requests.
Description#
The {{ product.meta }} placeholder is intended to display a custom field value from the product provided by the event.
It does not automatically retrieve metadata from every product in an order.
Usage#
Provide the exact metadata key using the required key parameter:
{{ product.meta | key: '_product_color' }}
Replace _product_color with your actual custom field key, including any leading underscore. Place the completed placeholder in a field that supports placeholders, such as the email subject or message.
The value should be simple text or a number. Arrays and objects require additional processing and are not suitable for direct output through this placeholder.
Parameters#
- key (required) — The exact metadata key of the custom field you want to display.
Fallback#
No custom fallback value is available. The placeholder displays no content when product data is unavailable, the key is empty or set to 0, or no value can be retrieved.
For variations, the implementation attempts to read the same key from the parent product when the initial lookup returns an empty value. This does not resolve the current-product lookup limitation described above.