I am trying to: Filter a Toolset-driven WooCommerce WordPress Archive using the wpv_filter_query & wpv_filter_query_post_process filters and they aren't firing at all
Link to my site: hidden link
I expected to see: My breakpoints triggering
Instead, I got: Nothing
Things I've confirmed:
- Toolset is powering the view linked above
- My IDE's breakpoints are working otherwise
- My plugin is activated and working otherwise
- These 2 filters are in your documentation: https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
I have a ran a backup of our staging site, but it is our in-development site, so please don't change anything major without warning us and please change things back when you're done if you do change anything.
Dear zachary,
This is expected result,
I assume we are talking about a taxonomy archive page, the filter wpv_filter_query and wpv_filter_query_post_process onl work for the normal view, it does not work for wordpress archive page, see our document:
wpv_filter_query
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
DescriptionWhen displaying a View listing posts, this filter is applied to the arguments being generated by the View settings before they are passed to the WP_Query class.
In your case, I suggest you try to add your own custom filters with wordpress built-in action hook "pre_get_posts", more help:
https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts