When using the Order, Coupon, Subscription Export Import for WooCommerce plugin, for including additional custom metadata before the line item columns in the CSV file, use the below mentioned code snippet. 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:
Comments (2)
Rahul Sarkar
January 3, 2022
Hi Team,
I have added Advanced Custom Fields plugin and added product attribute “hsn_codes”. I tried to use the above code to get this data but unable to get it, could you please help me writing the code for this, as i have very less technical knowledge in php.
Thank you.
Alan
January 6, 2022
Hi,
Are you required to export the custom metadata of the orders to the export CSV? If yes, then please enable the Hidden metadata option on the export screen and try exporting.