Woocommerce xml order export

G'day,

I'm can't get to figure out how to create a XML that contains all order data with custom element headers, like so; i checked a lot of plugin and Advanced Order Export For WooCommerce looked most promising.

This is what i need, with the details, taxes etc seperated

<order order_id="12759">
<details>
        <shopname>Company name</shopname>
        <order_date>2018-07-20 14:25:52</order_date>
        <base_currency_code>EUR</base_currency_code>
        <user_currency_code>EUR</user_currency_code>
        <weight_unit>kg</weight_unit>
        <total_weight>0.9500000000000001</total_weight>
        <tax_area>Germany</tax_area>
        <tax_exemption_number>0</tax_exemption_number>
    <taxes>
        <name>B.T.W.</name>
        <value>5.17</value>
        <rate>6.00</rate>
    </taxes>
        <fraud_status></fraud_status>
        <total_tax>5.17</total_tax>
        <purchase_exc_discount>91.26</purchase_exc_discount>
        <subtotals incl_tax="yes">91.26</subtotals>
        <total_price_inc_tax>101.21</total_price_inc_tax>
</details>

and this is what i am getting

<?xml version="1.0" encoding="UTF-8"?>
<Orders>
<Order>
  <order_id>4701</order_id>
  <shopname>Company name</shopname>
  <order_date>2018-10-23 18:04</order_date>
  <base_currency_code>EUR</base_currency_code>
  <user_currency_code>EUR</user_currency_code>
  <weight_unit>kg</weight_unit>
  <total_weight>0</total_weight>
  <tax_area>Netherlands</tax_area>
  <tax_exemption_number>0</tax_exemption_number>

  <name>B.T.W</name>
  <value>0</value>
  <rate>0</rate>

  <fraud_status/>
  <total_tax>0</total_tax>
  <purchase_exc_discount>68.49</purchase_exc_discount>
  <subtotals>0</subtotals>
  <total_price_inc_tax>68.49</total_price_inc_tax>

Thanks in advance :)

728x90

1 Answers Woocommerce xml order export

You should tweak "XML plugin" from section https://algolplus.com/plugins/code-samples/#sample_addons

my reply is a bit late, but I hope it helps.

6 months ago