Hi. How can we help?

Is it possible allow search only for some countries?

Yes, It's possible with a small customization.

Please add following code in the file functions.php of your theme. In our example we limit search for Australia and New Zeland

add_filter('yith_sl_autocomplete_options', 'yith_sl_autocomplete_set_restrictions');

if (!function_exists('yith_sl_autocomplete_set_restrictions')) {
    function yith_sl_autocomplete_set_restrictions($options)
        $options = array(
            'componentRestrictions'    =>    array(
                'country'    =>    ["AU", "NZ"]
        return $options;

Feel free replace our example values "AU" and "NZ" with your favourite ones.

You find the complete list of countries ISO codes at following link 


Was this article helpful?
0 out of 0 found this helpful

Back to Help Center >