3oax
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
seems like it will not be fixed.
here a little workaround. Not really the nicest way but it works for now, till it’s fixed:
function oax_yith_wcan_filter_url($url, $query_vars, $merge_mode){ $prefix_query_type = 'query_type_'; $prefix_filter = 'filter_'; $onlyOneValid = [ $prefix_filter . 'yourfilterhere', $prefix_filter . 'anotherfilterhere', ]; $url_arr = wp_parse_url($url); parse_str($url_arr['query'], $url_query_arr); foreach($url_query_arr as $url_query_key => $url_query_val){ $url_query_key_cleaned = str_replace([$prefix_query_type, $prefix_filter], ['', ''], $url_query_key); if( in_array($url_query_key, $onlyOneValid) ){ $checkParts = explode(',', $url_query_val); if( count($checkParts) > 1 ){ $url_query_arr[$url_query_key] = end($checkParts); } } } $url_arr['query'] = http_build_query($url_query_arr); $url = $url_arr['scheme'] . '://' . $url_arr['host'] . $url_arr['path'] . '?' . $url_arr['query']; return $url; } add_filter('yith_wcan_filter_url', 'oax_yith_wcan_filter_url', 10, 3);Seems like it’s only not working, when ajax is disabled. (dequeue_script)
My project uses ajax on the whole site, so i disabled it, because every link is automatically an ajax-link in my case. is there a way to fix this behaviour?Same Problem. Any Fixes?
Viewing 4 replies - 1 through 4 (of 4 total)