Difference between revisions of "Code Fixes"
From GLMWiki
(Created page with "- WooCommerce dropdown fix <pre> /* * The action below is necessary to make select2 work, which is the script used * for dropdown menus on the woocommerce checkout pages. Wi...") |
|||
Line 2: | Line 2: | ||
<pre> | <pre> | ||
/* | /* | ||
− | * The action below is necessary to make select2 | + | * The action below is necessary to make select2, which is the script used |
* for dropdown menus on the woocommerce checkout pages. Without it, any version | * for dropdown menus on the woocommerce checkout pages. Without it, any version | ||
* between 3.2.0 and at least 3.2.5 will have unusable dropdowns on the checkout | * between 3.2.0 and at least 3.2.5 will have unusable dropdowns on the checkout | ||
* pages for iOS devices (iPad, iPhone). It still works fine on OSX (mac). | * pages for iOS devices (iPad, iPhone). It still works fine on OSX (mac). | ||
* | * | ||
− | * | + | * So far this fix has only been necessary on Tom's Mom's Cookies. |
− | + | ||
*/ | */ | ||
add_action( 'wp_enqueue_scripts', 'agentwp_dequeue_stylesandscripts', 100 ); | add_action( 'wp_enqueue_scripts', 'agentwp_dequeue_stylesandscripts', 100 ); |
Latest revision as of 13:55, 30 November 2017
- WooCommerce dropdown fix
/* * The action below is necessary to make select2, which is the script used * for dropdown menus on the woocommerce checkout pages. Without it, any version * between 3.2.0 and at least 3.2.5 will have unusable dropdowns on the checkout * pages for iOS devices (iPad, iPhone). It still works fine on OSX (mac). * * So far this fix has only been necessary on Tom's Mom's Cookies. */ add_action( 'wp_enqueue_scripts', 'agentwp_dequeue_stylesandscripts', 100 ); function agentwp_dequeue_stylesandscripts() { if ( class_exists( 'woocommerce' ) ) { wp_dequeue_style( 'selectWoo' ); wp_deregister_style( 'selectWoo' ); wp_dequeue_script( 'selectWoo'); wp_deregister_script('selectWoo'); } }