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).
Open
Last updated: June 24, 2016
Log in to comment on this feature request.
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
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;
}