• Resolved cimita

    (@cimita)


    Hi,

    I know we can filter the orders in Woocommerce Analytics by order status and by order creation date.

    I need to filter by order status modified date. For example:

    For example:

    I received an order ‘01522’ on Jan 25. Today Jan 27 I passed it to Completed.

    I go to the Analytics part and I filter by date (Jan 27) and order status Completed.

    In the table appears the order ‘01522’. ??

    Can you please help? Do you know if this is possible to be done or if there is any plugin that could help me?

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ?? !

    It sounds like there is a Feature request about this functionality on GitHub. Please feel free to check the following link:

    https://github.com/woocommerce/woocommerce-rest-api/issues/37

    It seems that there are some workarounds for this ??

    Cheers!

    I got it working. Thanks.

    Thread Starter cimita

    (@cimita)

    Hi,

    Thank you very much for your help.

    I have been looking at the info @gabrielfuentes attached but something I must be doing wrong… because I can’t achieve to make it work. I’ll leave the steps I followed below maybe I did something wrong.

    I added this code in my functions.php, then tested by going to: Analytics->Orders->Date Rage(today)->Show Advanced Filters->Add a filter(Order status Is Completed).

    But I must be missing some step. It causes no change at all and shows 0 orders even tough I modified an order today by changing it from Processing to Completed…

    Could you please share how did you achieved to do it @keithdjbsp?

    Thank you very much.

    add_filter( 'woocommerce_rest_prepare_order_object', 'last_modified_update', 10, 3 ); 
    function last_modified_update( $response, $object, $request ) { 
    	if (!isset($request->get_params()['last_modified'])) return $response;
    	if (strtotime($response->data['date_modified']) > strtotime($request->get_params()['last_modified'])){
    	return $response;
    	}
        //return $response;
        }
    
    • This reply was modified 3 years, 10 months ago by cimita.

    Sorry, the problem I solved was different than this. I’m new to this interface and replied in the wrong thread. I was getting help on another thread with Attributes and Variations which has since been resolved. Wish I could be more helpful. Good luck.

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @cimita. Sorry that we missed your response. The code that you found is for a different issue. There is no option to filter orders by order status modified date currently built into WooCommerce, as you’ve found.

    Please add this as a suggestion to our [Ideas Board](hhttps://ideas.woocommerce.com/forums/133476-woocommerce). Our developers use that board to gauge community traction on what features to include in future versions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Woocommerce Analytics Filter orders by status modified date’ is closed to new replies.