Advanced Order Export for WooCommerce

WooCommerce TM Extra Product Options #3

Need all product options in one row? Not one row per option?

Previous code created multiple rows. This one is different.

All options stay in the same product row. Each option type becomes a comma-separated list.

What this code does

Takes multiple TM options. Combines them into single cells.

Example: One product with “Size: Large”, “Color: Blue”, “Gift Wrap: Yes”

Becomes one row with “Size: Large, Color: Blue, Gift Wrap: Yes” in the TM value column.

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 columns. Check the ones you need
  7. Save and test on an order with TM options

What your export looks like

One product. One row. Combined options.

ProductTM nameTM valueTM priceTM quantity
T-ShirtSize, Color, Gift WrapLarge, Blue, Yes0, 0, 51, 1, 1

Or with name_value column:

TM name_value
Size:Large, Color:Blue, Gift Wrap:Yes

Real example from the image

In the screenshot, a product has:

  • Front Label: “Happy Birthday!”
  • Gender: “Male”
  • Age: “12”

Output with this code (single row):

TM nameTM value
Front Label, Gender, AgeHappy Birthday!, Male, 12

TM name_value column:

TM name_value
Front Label:Happy Birthday!, Gender:Male, Age:12

Which TM columns to use

  • TM name – Option labels (Front Label, Gender, Age)
  • TM value – Customer selections (Happy Birthday!, Male, 12)
  • TM price – Extra costs (0.00, 0.00, 0.00)
  • TM quantity – How many of each option
  • TM name_value – Combined label:value pairs
  • TM pos – Order of options (1, 2, 3)

When to use this version

You want compact exports. One row per product. No matter how many options.

Your spreadsheet needs to be short. Easy to scroll through.

You don’t need to analyze each option separately. Just need to see all options together.

You’re sending data to a system that expects one row per product.

When to use the other version

Use the “one row per option” version when:

  • You need option-level totals
  • You’re calculating costs per option
  • Your warehouse picks each option separately

Common mistake

Mixing this code with the previous “one row per option” code. They do opposite things.

Pick one version. Stick with it.

Pro tip

Change the separator. Replace ", " with " | " or " / " or "\n" (newline).

Need only the values? Uncheck “TM name” column. Keep only “TM value”.

Real talk

Three ways to export TM Extra Product Options:

  1. One row per option – Maximum detail. More rows.
  2. One column per option – Wide spreadsheets. Compact.
  3. One row, combined cells – This version. Balanced.

Choose based on what your team needs. Test all three. Pick the winner.

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