Issues with Select2 fields and reverting to standard Select Fields
-
Hey There, My site is generating user frustration on Mobile devices because the select fields (checkout fields for country, province/state) are not working properly on iPhones. This is an issue which has occurred in the past and which I fixed by removing the fancy select2 selectors which ship with WooCommerce for basic select fields. The code I used (and which I found in multiple locations due to the high occurrence of this issue with themes from all over was ..
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 took care of my problems, and used default select fields, but now due to updates with WooCommerce this code is no longer working.
I know your response is going to start with ‘ Please disable all plugins and revert to a basic theme’ but I’m running a production website that is in the holiday shopping season and I’m hoping to get updated information on how to disable your fancy select fields again, rather than spend time and money trying to trouble shoot whether this issue is theme related or not and create downtime on my site at this crucial time. I will be looking for a fix long term, but now is not the best time to try to work that out.
Do you have information on how I can de-register these select fields in the current version of WooCommerce?
The page I need help with: [log in to see the link]
- The topic ‘Issues with Select2 fields and reverting to standard Select Fields’ is closed to new replies.