php - how to query WooCommerce products by date_modified
one text
i am trying to query products by date_modified, to find all the products i did not updated today.
this is the product query :
this is what i have tried so far :
$limit = 400;
    $products_ids = get_posts( array(
        'post_type'        => ['product','product_variation'],
        'numberposts'      => $limit,
        'post_status'      => 'publish',
        'fields'           => 'ids',
        'meta_query'       => array( array(
            'key'     => 'date_modified',
            'compare' => 'NOT LIKE',
            'value'   => '2022-11-17',
        ) )
    ) );
    print_r($products_ids);
Source