> For the complete documentation index, see [llms.txt](https://docs.sparkeditor.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sparkeditor.com/template-customization/customization-of-template/meta-data.md).

# Meta data

WooCommerce stores extra order details in the Post Meta table using a key-value format.

Although Spark Editor supports all default order values, you might have additional data from plugins or custom fields. For instance, the Shipment Tracking ID could be a custom field.&#x20;

Below is a screenshot of such a custom field.

<figure><img src="/files/9Q82CexrO89L2ujfWF6u" alt=""><figcaption></figcaption></figure>

WooCommerce allows adding additional values to every order using the "Custom Fields" section.

This custom field usually gets saved in the wp\_postmeta table as a meta\_key and meta\_value

In the above example,

meta\_key = tracking\_id (it is always good to use an underscore instead of spaces)\
meta\_value = 123456

\
Similarly, most shipment tracking id plugins save the data to the order (post) meta table. You can easily cross-check with the developer of the plugin to know where they save the data. It would most probably in the order meta (post meta) table.

> ```
> Also, you can add your own custom data as order values. WooCommerce allows "Adding Custom Field" in every order and save as order meta
> ```

> ```
> Or if you have created any additional custom fields in your orders, you can easily add the information to your emails by just adding a shortcode.
> ```

> **Step 1: Make sure you created the custom field or get the existing field's key**
>
> Go to your WordPress dashboard -> WooCommerce -> Orders
>
> Open an order and scroll to the bottom of the record.

<figure><img src="/files/I5Zv0HPF6IJ4r7fKaZIr" alt=""><figcaption></figcaption></figure>

You will see both existing Meta Name/Key and their values for the order.

You can also create new value for the order by click "Enter New" link

NOTE: Once created, this Meta Name / Key will be available in the "Select list" in all other orders. So you can simply select and just enter the values. Save.

**Step 2: How to fetch this order meta in email template**

Just go to your WooCommerce -> Spark Editor -> Edit the Email Template where you wanted to include the order meta

Add a short code in the following format: {{order\_meta.your\_meta\_key}}

In our example, it will be: {{order\_meta.tracking\_id}}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sparkeditor.com/template-customization/customization-of-template/meta-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
