Last active
March 6, 2018 11:45
-
-
Save nikola0203/7b787465f638721c49d0c74b8eb965d0 to your computer and use it in GitHub Desktop.
WooCommerce Customer/Order XML Export Suite - change root element of XML document.
This file contains hidden or 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
// Change first letter of XML tag <Orders> to lowercase. | |
function custom_xml_root_element( $export_type ) { | |
return lcfirst( $export_type ); | |
} | |
add_filter( 'wc_customer_order_xml_export_suite_xml_root_element', 'custom_xml_root_element', 10, 1 ); | |
// Change <Order> tage name. | |
function custom_order_format_tag_name( $orders_format, $orders ) { | |
$orders_format = array( | |
'order' => $orders, | |
); | |
return $orders_format; | |
} | |
add_filter( 'wc_customer_order_xml_export_suite_orders_xml_data', 'custom_order_format_tag_name', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment