I am trying to get product by price range. For example list all product which has its price between 0 and 1000 (it will vary).
my code is
[post_type] => product
[orderby] => ID
[post_status] => publish
[posts_per_page] => 18
[offset] => 0
[meta_query] => Array
(
[relation] => AND
[0] => Array
(
[key] => wpcf-price
[value] => Array
(
[0] => 0
[1] => 1000
)
[type] => NUMERICAL
[compare] => BETWEEN
)
)
this code is not working properly.How can i fix this issue?
Change
[type] => NUMERICAL
toNUMERIC