Woocommerce dropdown filter not working on iOS
I am currently working on a website / online store for clients and it is almost finished.
Also, I am lacking / bug / name-is-what-you-want in one of my (standard) woocommerce navigation widgets. On any device: pc / android-tablet / android-phone this works, but on any iOS device the (apparently) onchange action doesn't fire.
I saw that my product's sort order field is wrapped in a form called
<li class="woocommerce widget_layered_nav">
<h2 class="widgettitle">
--TITLE (sort)--
</h2>
<form class="woocommerce-ordering has-validation-callback" method="get">
<select name="orderby" class="orderby">
--Options (sort)--
</select>
</form>
</li>
And my other filters are not
<li id="woocommerce_layered_nav-5" class="widget woocommerce widget_layered_nav">
<h2 class="widgettitle">
--Title (brands)--
</h2>
<select class="dropdown_layered_nav_merk">
--Options (brands)--
</select>
</li>
Is there a workaround or fix for this problem?
+3
source to share
1 answer
Try it. Enter the following code in your theme's functions.php file:
add_action( 'wp_enqueue_scripts', 'agentwp_dequeue_stylesandscripts', 100 );
function agentwp_dequeue_stylesandscripts() {
if ( class_exists( 'woocommerce' ) ) {
wp_dequeue_style( 'select2' );
wp_deregister_style( 'select2' );
wp_dequeue_script( 'select2');
wp_deregister_script('select2');
}
}
This simple bit of code will disable extended fields and give you the good old dropdown menu. This method has been tested in WooCommerce 2.5.5.
+3
source to share