I would like to add custom args to all the Woocommerce Product queries to make them return only the products that are above a specified price. (>10$)
I would like to use an action on my theme’s function.php file.
Any clue? Thank you very much!
I would like to add custom args to all the Woocommerce Product queries to make them return only the products that are above a specified price. (>10$)
I would like to use an action on my theme’s function.php file.
Any clue? Thank you very much!
Comments are closed.
Add this function to the bottom of your
functions.php
and change the number to the correct one.Hooking to
woocommerce_product_query
directly.Taken from: https://react2wp.com/woocommerce-hide-products-without-price-simple-fix/