If you’re using an order tracking plugin, and this plugin has a function to attach the tracking info in WooCommerce order emails, these tracking info is the additional info. You can attach these info to email templates created by our plugin WooCommerce Email Template Customizer.
Basically, WooCommerce email notifications are not available with the tracking information in the orders notification emails. In fact, as a shop owner, you are aware of how important tracking information is in the orders, which allows to inform customers about their shipment journey. For this purpose, this article presents how to display tracking information in the orders email templates of the WooCommerce Email Template Customizer plugin
We thought about this problem and released the WooCommerce Email Template Customizer plugin, which offers a lot of amazing features including letting show the email contents of a 3rd plugin in general and the tracking information of a 3rd orders tracking plugin in particular. Now, scroll down to see how you work them out
Let’s get started.
Show the tracking info in order emails of WooCommerce Email Template Customizer plugin – Adding Tracking Info via WC Hook Element
WC Hook element is integrated to the email that allows you to insert custom code at points wherever the hooks run. If you want to display the content of the 3rd plugins, just drag and drop the WC Hook element to the position which you want to display in the email template. In particular, there are 3 hook positions, you can choose with this plugin: Before order table, After order table, Or order meta hook, just click on the element to switch among these positions. Here’s the full instruction for additional info in general.
With the WC Hook element, displaying tracking information for orders will be easier and more effective with the following steps:
1: Install a 3rd orders tracking plugin and the WooCommerce Email Template customizer plugin.
2: In the WooCommerce Email Template customizer, go to an order email template that you want to show tracking information, drag and drop the WC Hook element to the position where tracking info of the orders tracking plugin presents (before/after the order table) and save the settings.
3: Add tracking for the order, then the tracking info should be shown in our email template plugin.
You can see this video on how to use the WC Hook element of the WooCommerce Email Template customizer plugin:
1: Activate WooCommerce Email Template customizer plugin and WooCommerce Orders Tracking plugin (premium required)
2: Go to Orders Tracking setting > WooCommerce Email.
3: In the Tracking info position option, select the position to show tracking info in WooCommerce emails, they can be: After each order item; Before Order table; After Order table.
4: Test the order and see the coming email.
How to Include Shipment Tracking Numbers in Message Templates
You can easily add a shipment tracking number to your message template by following the straightforward method outlined in the linked post below. Additionally, we’ll guide you through creating a shipment tracking number placeholder for major WooCommerce shipping tracking plugins. With this approach, you can generate your own placeholder for any plugin, in particular with WooCommerce Email Template Customizer plugin by VillaTheme without requiring any developer expertise or coding skills.
WooCommerce Shipment Tracking plugin and Advanced Shipment Tracking for WooCommerce
With WooCommerce Shipment Tracking and Advanced Shipment Tracking, the shipment tracking number for your order is stored in the order meta (postmeta table) with the key _wc_shipment_tracking_items
. However, as the tracking number is saved as an array, you’ll need to specify the array key in the placeholder to ensure it functions correctly.
For order data, the placeholder format begins with {{order-}
. Following this, you need to specify your meta key, which for Shipment Tracking by WooCommerce and Advanced Shipment Tracking is _wc_shipment_tracking_items
. Since the details are stored in an array and the array key for the tracking number, as per their documentation, istracking_number
, you’ll need to include this in the placeholder with a colon separator (:
), like :tracking_number
. Therefore, the final placeholder will appear as follows:
{{order-_wc_shipment_tracking_items:tracking_number}}
By employing this approach, you can generate placeholders for any value associated with the plugin or any other plugin that stores data in the database using an array. If you’re uncertain about your meta key and array, you can reach out to the developer of the respective plugin for clarification. Alternatively, you can explore your database independently to gather this information.
Below are placeholders that can be used for these 2 tracking plugins:
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 Tracking Provider: {{order-_wc_shipment_tracking_items:custom_tracking_provider}}
Custom Tracking Link: {{order-_wc_shipment_tracking_items:custom_tracking_link}}
Note: Please note that the provided shortcodes are specifically designed for use with the WooCommerce Shipment Tracking Plugin and Advanced Shipment Tracking. However, you can apply the same method to create placeholders for any plugin that stores data in an array format.
The shortcode of WooCommerce Shipment Tracking and Advanced Shipment Tracking for WooCommerce will be written in WooCommerce Email Template Customizer like these:
Tracking Number: [wec_order_meta key="_wc_shipment_tracking_items" array_key="tracking_number"]
Tracking Provider: [wec_order_meta key="_wc_shipment_tracking_items" array_key="tracking_provider"]
Date Shipped: [wec_order_meta key="_wc_shipment_tracking_items" array_key="date_shipped"]
Custom Tracking Provider: [wec_order_meta key="_wc_shipment_tracking_items" array_key="custom_tracking_provider"]
Custom Tracking Link:[wec_order_meta key="_wc_shipment_tracking_items" array_key="custom_tracking_link"]
WooCommerce Shipping Tracking
WooCommerce Shipping Tracking stores data not only in a single meta key but also utilize an array format for additional tracking numbers. As the data resides in the postmeta table, the tracking placeholders will begin with {{post-
.
Primary Tracking Number: {{post-_wcst_order_trackno}}
Primary Courier Name: {{post-_wcst_order_trackname}}
Primary Dispatch Date: {{post-_wcst_order_dispatch_date}}
Primary Custom Text: {{post-_wcst_custom_text}}
Primary Tracking URL: {{post-_wcst_order_track_http_url}}
Additional Tracking Number: {{post-_wcst_additional_companies:_wcst_order_trackno}}
Additional Courier Name: {{post-_wcst_additional_companies:_wcst_order_trackname}}
Additional Dispatch Date: {{post-_wcst_additional_companies:_wcst_order_dispatch_date}}
Additional Custom Text: {{post-_wcst_additional_companies:_wcst_custom_text}}
Additional Tracking URL: {{post-_wcst_additional_companies:_wcst_order_track_http_url}}
Note: The shortcodes are specifically designed for use with the WooCommerce Shipping Tracking plugin. However, you can apply the same method to create placeholders for any plugin that stores data in an array format.
The shortcode of WooCommerce Shipping Tracking will be written in WooCommerce Email Template Customizer like these:
Primary Tracking Number: [wec_order_meta key="_wcst_order_trackno"]
Primary Courier Name: [wec_order_meta key="_wcst_order_trackname"]
Primary Dispatch Date: [wec_order_meta key="_wcst_order_dispatch_date"]
Primary Custom Text: [wec_order_meta key="_wcst_custom_text"]
Primary Tracking URL:[wec_order_meta key="_wcst_order_track_http_url"]
Additional Tracking Number: [wec_order_meta key="_wcst_additional_companies" array_key="_wcst_order_trackno"]
Additional Courier Name: [wec_order_meta key="_wcst_additional_companies" array_key="_wcst_order_trackname"]
Additional Dispatch Date: [wec_order_meta key="_wcst_additional_companies" array_key="_wcst_order_dispatch_date"]
Additional Custom Text: [wec_order_meta key="_wcst_additional_companies" array_key="_wcst_custom_text"]
Additional Tracking URL: [wec_order_meta key="_wcst_additional_companies" array_key="_wcst_order_track_http_url"]
Yith WooCommerce Order Tracking
As Yith doesn’t store its tracking data in an array format like the previous plugin, creating and understanding the placeholder is much simpler. Additionally, most plugins don’t store their data in an array, so this process will be the same for many plugins.
The data from Yith is stored in the postmeta table of WordPress, so the placeholder will start with {{post-
as a prefix. Their tracking data is stored with the metaywot_tracking_code
, so the tracking code for this plugin will be represented as follows: {{post-ywot_tracking_code}}
.
Since no array is used in this data, we will not use an array identifier for this placeholder. This method allows you to create a placeholder for any plugin or tracking plugin that does not store its data in an array. If an array is used, then the ‘Shipment Tracking by WooCommerce’ method should be applied.
If you are uncertain about your meta key, you can contact the developer of the respective plugin or inspect your database to find it.
Below are placeholders that can be used for this plugin:
Tracking Code: {{post-ywot_tracking_code}}
Carrier Name: {{post-ywot_carrier_name}}
Pickup Date: {{post-ywot_pick_up_date}}
Premium Version
Carrier Name: {{post-ywot_carrier_id}}
Note: Please note that the provided shortcodes are specifically designed for use with the Yith WooCommerce Order Tracking. However, you can apply the same method to create placeholders for any plugin that stores data in an array format.
The shortcode of Yith WooCommerce Order Tracking will be written in WooCommerce Email Template Customizer like these:
Tracking Code: [wec_order_meta key="ywot_tracking_code"]
Carrier Name: [wec_order_meta key="ywot_carrier_name"]
Pickup Date: [wec_order_meta key="ywot_pick_up_date"]
Premium Version
Carrier Name: [wec_order_meta key="ywot_carrier_id"]