Advanced Order Export for WooCommerce

WooCommerce TM Extra Product Options #2

Selling products with custom options? Engraving, gift wrap, size, color?

TM Extra Product Options plugin adds these choices. Standard exports ignore them.

Here’s how to export each option as its own row.

What this code does

Takes each product option. Turns it into a separate row. Shows:

  • TM pos (position/order of the option)
  • TM name (what the option is called)
  • TM value (what customer selected)
  • TM price (how much it cost)
  • TM quantity (how many)
  • TM name_value (combined name and value)

The complete code

Setup steps

  1. Copy the entire code block
  2. Paste into your theme’s functions.php
  3. Go to Advanced Order Export for WooCommerce
  4. Create or edit an export profile
  5. Open Setup Fields → Products
  6. You’ll see TM fields. Check the ones you need
  7. Save and test on an order with TM options

What your export looks like

Order with one product and two options:

ProductTM nameTM valueTM priceTM quantity
T-ShirtSizeLarge$0.001
T-ShirtColorBlue$0.001
T-ShirtGift WrapYes$5.001

Each option gets its own row. Same product appears multiple times.

Real examples

Engraved necklace:

ProductTM nameTM valueTM price
PendantEngraving Text“Love Mom”$10.00
PendantChain Length18 inch$0.00

Pizza order:

ProductTM nameTM valueTM priceTM quantity
Large PizzaToppingPepperoni$2.001
Large PizzaToppingMushrooms$1.501
Large PizzaCrustThin$0.001

When you need this

You sell customizable products. Need to track each option separately.

Your fulfillment team needs to see engraving text, sizes, or colors.

You calculate costs per option. Need breakdown by option type.

You analyze which options sell best. Need option-level data.

How it works

TM Extra Product Options stores selections in order item meta:

  • _tmcartepo_data for regular options
  • _tmcartfee_data for fee-based options

The code reads both. Extracts each option. Creates a new product row per option.

Common mistake

The code duplicates products. One product with 3 options becomes 3 rows.

Your row count increases dramatically. Export files get larger.

Test on a single order first. Understand the output.

Empty TM columns?

No TM options on this product. Or TM plugin not active.

The code simply copies the original product row. TM columns stay empty.

Pro tip

Need only certain options? Filter by $tm_field['name']. Skip unwanted options.

Need option totals? Add the TM price column. Sum in your spreadsheet.

Real talk

TM Extra Product Options is powerful. Customers can build complex products.

But standard exports lose all that detail. This code recovers it.

Your production team gets clear instructions. “Engrave ‘Love Mom’ on pendant” appears in its own row. No ambiguity. No back-and-forth emails.

Have questions? Please submit a support request. We're always happy to help!

Advanced Order Export
for WooCommerce
PRO

From $30
Buy
✓ 30-day money-back guarantee