woocs_drop_down_view
add_filter('woocs_drop_down_view', 'woocs_drop_down_view', 999);
function woocs_drop_down_view($view)
{
if (wp_is_mobile())
{
return 'no';
}
return $view;
}
Its possible to use next values: no, ddslick, chosen, chosen_dark, wselect, flags
Disable switcher drop-down skin in the AJAX mode of your site:
add_filter('woocs_drop_down_view', 'woocs_drop_down_view', 999);
function woocs_drop_down_view($view)
{
if (defined('DOING_AJAX') && DOING_AJAX)
{
return 'no';
}
return $view;
}
https://codex.wordpress.org/Function_Reference/wp_is_mobile
Set any another skin for the currency switcher drop-down on the pages of your site dependently of its page:
add_filter('woocs_drop_down_view', 'my_woocs_drop_down_view', 1);
function my_woocs_drop_down_view($view)
{
if ($_SERVER['REQUEST_URI'] == '/shop/clothing/happy-ninja-2/')
{
$view = 'chosen';
}
return $view;
}
There is possible to manipulate with view of switcher using your own conditions. For example we want to use in the shop sidebar 'ddslick' view but in top of the site you want to use flags. You can do it in the next way:
- open file header.php file of the current wp theme and in the place you want too see currency switcher drop next code:
$_REQUEST['woocs_top_menu']=1; echo do_shortcode('[woocs]'); unset($_REQUEST['woocs_top_menu']); - open file functions.php file of the current wp theme, and on the same bottom of the file drop next code:
add_filter('woocs_drop_down_view','my_woocs_drop_down_view'); function my_woocs_drop_down_view($view){ if(isset($_REQUEST['woocs_top_menu'])){ $view='flags'; } return $view; }