WooCommerce Shop Orders by Date

I need to get WooCommerce orders and filter it between dates but its not working.

Here's my code:

$start = '2022-03-00';
$end = '2022-12-20';

$args = array(
    'post_type' = 'shop_order',
    'posts_per_page' = -1,
    'after'     = $start, 
    'before'    = $end,
    'meta_query' = array(
        array(
            'key' = '_order_send_time',
            'value' = array($start, $end),
            'compare' = 'BETWEEN',
            'type' = 'DATE'
        ),
        array(
            'key' = '_fb_pickup_branch',
            'value' = 900,
            'compare' = 'like',
        )
    )
);
// query
$events_query = new WP_query();
$events_query-query($orderArgs);

Topic date-query woocommerce-offtopic Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.