Convert more holiday shoppers with express checkout and buy now, pay later. Learn more
Product Icon

Xero for WooCommerce

Save time with automated sync between WooCommerce and your Xero account.

Add filter to Invoice status

I’ve made a change to the code in classes/class-wc-xr-invoice.php on line 335 that changes the status of a new order from APPROVED to DRAFT. This small change works perfectly with Xero for me. Would it be possible for the developers to add a filter to this line that allows a plugin to override the default order status? Even more useful would be an extra setting in the settings page (but i know that is asking a bit much).

Author

Anonymous

Current Status

Open

Last updated: June 24, 2016

2 comments

Log in to comment on this feature request.

  1. kameleondigital says:

    Hi @kjhosting can you please let me know where in the website I add the filter?
    It doesn’t seem to work within the theme’s functions.php

  2. kjhosting says:

    I know this is 8 years old! But just in case someone is still looking for this feature, it’s easily achievable by using their provided filter:

    add_filter(“woocommerce_xero_invoice_to_xml”,”kjh_change_xero_status”);
    function kjh_change_xero_status($xml){
    $xml = str_replace(“AUTHORISED”,”DRAFT”,$xml);
    return $xml;
    }

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.