Skip to content

Instantly share code, notes, and snippets.

@maxrice
Last active December 23, 2015 05:48
Show Gist options
  • Save maxrice/6589105 to your computer and use it in GitHub Desktop.
Save maxrice/6589105 to your computer and use it in GitHub Desktop.
Add multiple elements to WooCommerce Customer/Order XML Export Suite
<?php
add_filter( 'wc_customer_order_xml_export_suite_order_export_order_list_format', function ( $order_format, $order ) {
$order_format['AddressCapabilities'] = array(
'AddressCapability' => array(
0 => array(
'@attributes' => array( 'AddressType' => 'MAIN' ),
),
1 => array(
'@attributes' => array( 'AddressType' => 'OFC', 'isMainAddress' => 'true' ),
),
)
);
return $order_format;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment