{"id":66,"date":"2019-06-29T13:00:26","date_gmt":"2019-06-29T13:00:26","guid":{"rendered":"https:\/\/help.unitedover.com\/wpnotif\/?post_type=manual_kb&#038;p=66"},"modified":"2020-07-12T11:54:56","modified_gmt":"2020-07-12T11:54:56","slug":"how-to-create-custom-placeholders","status":"publish","type":"manual_kb","link":"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/","title":{"rendered":"How to create Custom Placeholders"},"content":{"rendered":"<p>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.<\/p>\n<p>For order details <strong>{{order-<span style=\"color: #ff0000;\">meta_key<\/span>}}<\/p>\n<p><\/strong>For order item details <strong>{{orderitem-<span style=\"color: #ff0000;\">meta_key<\/span>}}<\/strong><\/p>\n<p>For user details <strong>{{user-<span style=\"color: #ff0000;\">meta_key<\/span>}}<\/strong><\/p>\n<p>For post meta <strong>{{post-<span style=\"color: #ff0000;\">meta_key<\/span>}}<br \/>\n<\/strong><\/p>\n<p>For Multi-Vendor\/Marketplace Plugins <strong>{{vendor-<span style=\"color: #ff0000;\">meta_key<\/span>}}<\/strong><\/p>\n<p><em>In the above formats just replace the meta_key text with the actual meta key.\u00a0<\/em><\/p>\n<p><em>If you don&#8217;t know in which meta the data is getting stored, then you can contact that respective plugin developer to know about it.\u00a0<\/em><\/p>\n<p>If the data in meta is saved in an array in meta or on sending SMS its returning &#8220;Array&#8221; in the message then to use array values you can use the below format<\/p>\n<p><strong>{{order-<span style=\"color: #ff0000;\">meta_key<\/span>:<span style=\"color: #339966;\">arraykey<\/span>}}<\/p>\n<p>{{orderitem-<span style=\"color: #ff0000;\">meta_key<\/span>:<span style=\"color: #339966;\">arraykey<\/span>}}<\/strong><\/p>\n<p><strong>{{user-<span style=\"color: #ff0000;\">meta_key<\/span>:<span style=\"color: #339966;\">arraykey<\/span>}}<\/strong><\/p>\n<p><strong>{{post-<span style=\"color: #ff0000;\">meta_key<\/span>:<span style=\"color: #339966;\">arraykey<\/span>}}<br \/>\n<\/strong><\/p>\n<p><strong>{{vendor-<span style=\"color: #ff0000;\">meta_key<\/span>:<span style=\"color: #339966;\">arraykey<\/span>}}<\/strong><\/p>\n<p><em>In the above formats just replace the meta_key and arraykey text with the actual meta key.\u00a0<\/em><\/p>\n<p><em>If you don&#8217;t know in which array key the data is getting stored, then you can contact that respective plugin developer to know about it.\u00a0<\/em><\/p>\n<h5>How to know if the data is getting saved in array?<\/h5>\n<p>The simplest method to check this is to ask your plugin developer.<\/p>\n<h3>Hooks to create Custom Placeholder<\/h3>\n<p><strong><em>&#8211; wpnotif_filter_message<\/em><br \/>\n<\/strong>You can filter\/replace the whole message template by calling this hook<\/p>\n<p><strong>arguments<\/strong><strong>&#8211;<\/strong> $message -&gt; Message that will be sent $order -&gt; WC Order object<br \/>\n<strong><br \/>\nreturn- <\/strong>$message<\/p>\n<p><strong><em>&#8211; wpnotif_placeholder_args<\/em><br \/>\n<\/strong>This can be used for adding custom value to the placeholder<\/p>\n<p><strong>arguments<\/strong><strong>&#8211;<\/strong> $value -&gt; value of meta tag, $order -&gt; WC Order object, $placeholder -&gt; placeholder, $message -&gt; Message that will be sent, $order -&gt; WC Order object<br \/>\n<strong><br \/>\nreturn- <\/strong>value of placeholder that will be used in place of {{$placeholder}}<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":28,"template":"","format":"standard","manualknowledgebasecat":[2],"manual_kb_tag":[],"class_list":["post-66","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-getting-started"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create Custom Placeholders - WPNotif Help<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create Custom Placeholders - WPNotif Help\" \/>\n<meta property=\"og:description\" content=\"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 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/\" \/>\n<meta property=\"og:site_name\" content=\"WPNotif Help\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-12T11:54:56+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/\",\"url\":\"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/\",\"name\":\"How to create Custom Placeholders - WPNotif Help\",\"isPartOf\":{\"@id\":\"https:\/\/help.unitedover.com\/wpnotif\/#website\"},\"datePublished\":\"2019-06-29T13:00:26+00:00\",\"dateModified\":\"2020-07-12T11:54:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/help.unitedover.com\/wpnotif\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create Custom Placeholders\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/help.unitedover.com\/wpnotif\/#website\",\"url\":\"https:\/\/help.unitedover.com\/wpnotif\/\",\"name\":\"WPNotif Help\",\"description\":\"WordPress SMS &amp; WhatsApp Notifications\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/help.unitedover.com\/wpnotif\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create Custom Placeholders - WPNotif Help","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/","og_locale":"en_US","og_type":"article","og_title":"How to create Custom Placeholders - WPNotif Help","og_description":"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 [&hellip;]","og_url":"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/","og_site_name":"WPNotif Help","article_modified_time":"2020-07-12T11:54:56+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/","url":"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/","name":"How to create Custom Placeholders - WPNotif Help","isPartOf":{"@id":"https:\/\/help.unitedover.com\/wpnotif\/#website"},"datePublished":"2019-06-29T13:00:26+00:00","dateModified":"2020-07-12T11:54:56+00:00","breadcrumb":{"@id":"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/help.unitedover.com\/wpnotif\/kb\/how-to-create-custom-placeholders\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/help.unitedover.com\/wpnotif\/"},{"@type":"ListItem","position":2,"name":"How to create Custom Placeholders"}]},{"@type":"WebSite","@id":"https:\/\/help.unitedover.com\/wpnotif\/#website","url":"https:\/\/help.unitedover.com\/wpnotif\/","name":"WPNotif Help","description":"WordPress SMS &amp; WhatsApp Notifications","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/help.unitedover.com\/wpnotif\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"acf":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/help.unitedover.com\/wpnotif\/wp-json\/wp\/v2\/manual_kb\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.unitedover.com\/wpnotif\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/help.unitedover.com\/wpnotif\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/help.unitedover.com\/wpnotif\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":0,"href":"https:\/\/help.unitedover.com\/wpnotif\/wp-json\/wp\/v2\/manual_kb\/66\/revisions"}],"wp:attachment":[{"href":"https:\/\/help.unitedover.com\/wpnotif\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/help.unitedover.com\/wpnotif\/wp-json\/wp\/v2\/manualknowledgebasecat?post=66"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/help.unitedover.com\/wpnotif\/wp-json\/wp\/v2\/manual_kb_tag?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}