Tell us what you are trying to do? I'm attempting to implement a price range filter for WooCommerce products.
Is there any documentation that you are following? I couldn't find any documentation in regards to this, so I was using this support thread as a starter guide: https://toolset.com/forums/topic/seting-a-filter-by-price-range/
What is the link to your site? hidden link
Under Query Filters, I have: WooCommerce Product Price is a string between URL_PARAM(wpv-views_woo_price), wpv-views_woo_price
It didn't look like there were any other query filters I could pull here that would be relevant to my situation.
I also tried number. This didn't work either.
This is my Views filter shortcode:
[wpv-control-postmeta field="views_woo_price" type="checkboxes" source="custom" url_param="wpv-views_woo_price" values="100-500,500-1000,1000-3000,3000-10000,10000-100000" display_values="$100 - $500, $500 - $1,000, $1,000 - $3,000, $3,000 - $10,000, $10,000 - $100,000"]
The filter displays just fine, but it doesn't filter the items in the loop.
I also implemented the PHP snippet into my functions.php file as instructed in the original support thread.
add_filter('wpv_filter_query', 'search_between_numeric_func', 90, 2);
function search_between_numeric_func($query, $setting) {
if($setting['view_id'] == 99999) {
// your code goes here
}
return $query;
}
I didn't make any modifications to it, as I didn't know what I could change, or even if I should. Perhaps under the comment "your code goes here", but it's not further explained in the thread.
Basically, I'm just trying to filter my archive results, within preset numeric ranges, utilizing a product's price established in the WooCommerce price fields.