When using the Order, Coupon, Subscription Export Import for WooCommerce plugin to include additional custom metadata before the line item columns in the CSV file, use the code snippet below. You need to add the code in the functions.php file and change the parameters RDI and LDI with the custom field names that you need to export. To reach the functions.php file, follow the below-mentioned steps:
- From the WordPress admin dashboard, navigate to Appearance > Theme File Editor.
- Under Theme Files, select Theme Functions (functions.php).
- Paste the code snippet at the end of the functions.php file of your active child theme.
Code snippet: