• Hi. I have disabled multiple selections on ‘YITH WooCommerce Ajax Product Filter
    ‘ on the presets.
    See: https://ibb.co/MhdWd34

    But I can still select multiple categories at the same time. I want the previously selected items (if any) to deselect when a new item is selected.
    You can check the issue on this page: https://indivisual.xyz/shop/

    Also, the reset button is not working. So, I can’t reset my selection.

    Please, provide me with the solutions, thank you so much!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Andrea Grillo

    (@agengineering)

    Hi there,

    in which filter have you enabled this option? I see that you have different filter in sidebar.

    If you use a cache please try to clean it.

    Thread Starter soad2609

    (@soad2609)

    In all the filters. I have already tried clearing cache but no fix.

    Same Problem. Any Fixes?

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,
    I can’t replicate the issue on my installation.
    Did you try check if the problem persists usng the plugin with only WooCommerce and a WordPress default theme?

    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?

    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 will not be fixed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multiple Selection is disabled yet users can select multiple catagories’ is closed to new replies.