good morning,
I give you an example to explain my problem:
– I created a numeric custom field.
– in the products the custom filed contains 0,29
– the query below does not return products (if I remove the filter on the numeric field, it works)
$args = array(
‘post_type’ => ‘product’,
‘post_status’ => ‘publish’,
‘orderby’ => ‘_price’,
‘order’ => “asc”,
‘posts_per_page’ => 1000,
‘paged’ => 1,
‘tax_query’ => array(
‘relation’ => ‘AND’,
array (
‘taxonomy’ => ‘product_cat’,
‘field’ => ‘slug’,
‘terms’ => array(‘diamanti-sfusi’),
‘operator’ => ‘IN’
),
),
‘meta_query’ => array(
‘relation’ => ‘AND’,
array(
‘key’ => ‘stone_carat’,
‘value’ => 0.10,
‘type’ => ‘NUMERIC’,
‘compare’ => ‘>’
)
)
);