How do I set the query of a posts module through AJAX?
I need a custom product taxonomies filter for WC products that updates WC Products on the Shop page though AJAX. I know how to do this with pure WP (no BB), but this site is built with BB and my client wants to be able to change the layout of the posts module over time so I need to be able to modify the query of the Posts module dynamically.
I found this code, but it does not work:
$module = FLBuilderModel::get_node_by_id( $module_id );
$module->settings->query = $query_args;
ChatGPT gave me the code. It is hit or miss with ChatGPT but sometimes it does steer me in the right direction.
On the filter fl_builder_loop_query_args: that works on page load, but I need to repaint/reload the whole module when a new filter value is selected. And I do not want to reload the full page, just posts module.
Do you have any idea on how to do that?