• HOME
  • KNOWLEDGE BASE
  • FAQ
  • CONTACT US
  • HOME
  • KNOWLEDGE BASE
  • FAQ
  • CONTACT US
home/Knowledge Base/Getting Started/How to create Custom Placeholders

How to create Custom Placeholders

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}}

Was this helpful?

5 Yes  20 No
Getting Started
  • How to create Custom Placeholders
  • Placeholders for Message Template
  • How to Setup AWS with WPNotif WordPress Plugin
  • How to use WhatsApp Business API
  • How to use WhatsApp Business Free
  • How to add Shipment Tracking Number in message template
View All 8  
Categories
  • Gateway
  • Getting Started
  • How To
  • Newsletter

  How to Setup AWS with WPNotif WordPress Plugin

How to add Shipment Tracking Number in message template  

    • Made with ❤ by Humans on 🌎