Created
September 17, 2013 02:00
-
-
Save maxrice/6589202 to your computer and use it in GitHub Desktop.
Add custom line item meta to the WooCommerce Customer/Order XML Export Suite XML output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wc_customer_order_xml_export_suite_order_export_line_item_format', function( $line_item_format, $order, $item ) { | |
// remove imploded meta | |
unset( $line_item_format['Meta'] ); | |
// add custom meta | |
$line_item_format['YourFullName'] = woocommerce_get_order_item_meta( $item['id'], 'your_full_name', true ); | |
return $line_item_format; | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment