A shipping tracking number can be added to the message template using a simple method described in the post linked below. We'll also show you how to create a shipping tracking number placeholder for two major WooCommerce plugins, the WooCommerce shipment tracking and the order tracking Yith WooCommerce , so using this method you can create your own placeholder for any plugin out there without any developer knowledge or coding.
We even recommend reading the article linked below or at least skimming it before proceeding with one, so you can get a better understanding of what we're doing.
Shipping Tracking via WooCommerce
According to the WooCommerce document https://docs.woocommerce.com/document/shipment-tracking/ Your order's shipping tracking number is saved under order meta (postmeta table) with the key _wc_shipment_tracking_items , but since they are saving the number tracking as an array, you will also need to mention their array key in our placeholder for this to work properly.
So, for order data, the format for the placeholder starts with {{order- after this, you need to mention your meta-key, which in case Shipping Tracking for WooCommerce è _wc_shipment_tracking_items and since they are saving the details in an array and an array key for the shipping number as per their document is tracking_number so we will have to add this in the placeholder with colon (:) as : tracking_number . So the final placeholder will look like this.
{{order-_wc_shipment_tracking_items: TRACKING_NUMBER}}
And using this method, you can create placeholders for any value or plugin that uses an array to store data in the database. If you're unsure what your meta key and array are, you can contact the plugin developer to find out, or you can try searching your database yourself and finding it.
You can also use the following placeholders which will work for this plugin
Tracking Number: {{order _wc_shipment_tracking_items: TRACKING_NUMBER}}
Tracking Provider: {{order _wc_shipment_tracking_items: tracking_provider}}
Date Shipped: {{order _wc_shipment_tracking_items: date_shipped}}
Custom Monitoring Providers: {{order _wc_shipment_tracking_items: custom_tracking_provider}}
Tailored Tracking Link: {{order-_wc_shipment_tracking_items: custom_tracking_link}}
We've also built integration with the Shipping Tracking plugin so you can even render tracking links for it.
Tracking link: {{wc-tracking-link}}
Please note that the codes short above will only work with the WooCommerce shipping tracking plugin .But you can create placeholders for any plugin that stores data in an array format using the same method.
Advanced Shipping Tracking for WooCommerce
Advanced shipping tracking data for WooCommerce is stored in the WordPress postmeta table, so the placeholder will start with {{post- as a prefix and the tracking data will be stored in an array.
Tracking Number: {{post-_wc_shipment_tracking_items: TRACKING_NUMBER}}
Tracking Provider: {{post-_wc_shipment_tracking_items: tracking_provider}}
Date Shipped: {{post-_wc_shipment_tracking_items: date_shipped}}
Custom Monitoring Providers: {{post-_wc_shipment_tracking_items: custom_tracking_provider}}
Tailored Tracking Link: {{post-_wc_shipment_tracking_items: custom_tracking_link}}
We've also built integration with the Shipping Tracking plugin so you can even render tracking links for it.
Tracking link: {{wc-tracking-link}}
Please note that the above function codes only work for the Advanced Shipping Tracking for WooCommerce by Zorem .But you can create placeholders for any plugin that stores data in an array format using the same method.
AfterShip – WooCommerce Tracking
AfterShip – WooCommerce Tracking data is stored in the WordPress postmeta table, so the placeholder will start with {{post- as a prefix and their tracking data will be stored in meta-key.
Tracking number: {{post-_aftership_tracking_number}}
Name courier : {{post-_aftership_tracking_provider_name}}
Shipping date: {{post-_aftership_tracking_shipdate}}
Tracking code: {{post-_aftership_tracking_postal}
Destination country: {{postco}
Please note that the above function codes will only work with AfterShip – WooCommerce Tracking .But you can create placeholders for any plugin that stores data in meta-key format using the same method.
Yith WooCommerce Order Tracking
Since yith does not save their tracking data in array format like the plugin above, so it is much easier to create and understand the placeholder and most plugins do not save their data in an array, so this process will be the same for most of the plugins.
Yith data is stored in WordPress postmeta table, so the placeholder will start with {{post- as a prefix and their tracking data is stored with meta ywot_tracking_code, so the tracking code for this plugin will be
{{Post-ywot_tracking_code}}
Since there is no array used in this data, we will not use the array identifier in this placeholder.
Using this method, you can create placeholders for any plugin or tracking application out there that doesn't store its data in an array. If an array is used, use the WooCommerce shipping tracking method. If you're unsure what your meta key is, you can contact the plugin developer to find out, or you can try searching your database yourself and finding it.
You can also use the following placeholders which will work for this plugin
Tracking code: {{post-ywot_tracking_code}}
Operator Name: {{post-ywot_carrier_name}}
Date of withdraw : {{post-ywot_pick_up_date}}
Premium Version
Operator Name: {{post-ywot_carrier_id}}
Please note that the above function codes will only work with the Yith WooCommerce order tracking .But you can create placeholders for any plugin using the same method.



