Please include custom order statuses to WooCommerce reports
-
Custom order statuses created by the plugin are not added to WooCommerce reports, so orders marked as “En curso cex” or “Entregado cex” won’t be reported as sales.
Also, on orders admin page, returned orders (returned-cex status) are shown as “Entregado cex” on list filters, instead as “Devuelto cex”.
A quick workaround to display these custom order statuses on reports could be to use the woocommerce_reports_order_statuses filter:
/*-----------------------------------------------------------------------------------*/ /* Filtre Inclou Correos Express Statuses als Reports de WooCommerce */ /*-----------------------------------------------------------------------------------*/ add_filter( 'woocommerce_reports_order_statuses', 'include_custom_order_status_to_reports', 20, 1 ); function include_custom_order_status_to_reports( $statuses ){ return array( 'processing', 'in-progress', 'completed', 'on-hold', 'delivered-cex', 'sending-cex' ); }
These workaround should be included on the plugin instead of the template. Also, I’d like to know what happens with these custom order statuses when the plugin is disabled.
Thanks in advanced.
Marc
- The topic ‘Please include custom order statuses to WooCommerce reports’ is closed to new replies.