Skip to content

Instantly share code, notes, and snippets.

@ibndawood
Forked from farookibrahim/functions.php
Created October 20, 2017 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibndawood/2c6d2c3aa86b70e7dfa6ae2a115394cf to your computer and use it in GitHub Desktop.
Save ibndawood/2c6d2c3aa86b70e7dfa6ae2a115394cf to your computer and use it in GitHub Desktop.
Pizzaro - YITH Product Add ons compatibility issue with WC 3.2.x
if ( class_exists( 'YITH_WAPO' ) ) {
function pz_child_yith_pa_comp_fix() {
wp_register_script( 'select2', WC()->plugin_url() . '/assets/js/select2/select2.full.min.js', array( 'jquery' ) );
wp_enqueue_script( 'select2' );
wp_register_script( 'selectWoo', WC()->plugin_url() . '/assets/js/selectWoo/selectWoo.full.min.js', array( 'jquery' ) );
wp_enqueue_script( 'selectWoo' );
wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select.min.js', array( 'jquery', 'selectWoo' ) );
wp_enqueue_script( 'wc-enhanced-select' );
}
add_action( 'admin_enqueue_scripts', 'pz_child_yith_pa_comp_fix' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment