We support custom placeholders, which means that you can create your own placeholder for any value present in your database and you are not at all limited by the placeholders we provide. Just follow the below format for the placeholder and put it in your template for use, no code edits, nothing.
For order details {{order-meta_key}}
For order item details {{orderitem-meta_key}}
For user details {{user-meta_key}}
For post meta {{post-meta_key}}
For Multi-Vendor/Marketplace Plugins {{vendor-meta_key}}
In the above formats just replace the meta_key text with the actual meta key.
If you don’t know in which meta the data is getting stored, then you can contact that respective plugin developer to know about it.
If the data in meta is saved in an array in meta or on sending SMS its returning “Array” in the message then to use array values you can use the below format
{{order-meta_key:arraykey}}
{{orderitem-meta_key:arraykey}}
{{user-meta_key:arraykey}}
{{post-meta_key:arraykey}}
{{vendor-meta_key:arraykey}}
In the above formats just replace the meta_key and arraykey text with the actual meta key.
If you don’t know in which array key the data is getting stored, then you can contact that respective plugin developer to know about it.
How to know if the data is getting saved in array?
The simplest method to check this is to ask your plugin developer.
Hooks to create Custom Placeholder
– wpnotif_filter_message
You can filter/replace the whole message template by calling this hook
arguments– $message -> Message that will be sent $order -> WC Order object
return- $message
– wpnotif_placeholder_args
This can be used for adding custom value to the placeholder
arguments– $value -> value of meta tag, $order -> WC Order object, $placeholder -> placeholder, $message -> Message that will be sent, $order -> WC Order object
return- value of placeholder that will be used in place of {{$placeholder}}