WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Great ecommerce plugin (1 post)

5 stars
  1. Andy
    Member
    Posted 4 months ago #

    Thanks for great plugin. Just one moment - in new version plugin enqueue core version of JQuery if current version less than 1.8. Can you, please, add with future update also JQuery Migrate plugin to enqueue with core version of JQuery, for better backward compatibility.

    Something like:

    public function check_jquery() {
        global $wp_scripts;
    
        // Enforce minimum version of jQuery
        if ( ! empty( $wp_scripts->registered['jquery']->ver ) && ! empty( $wp_scripts->registered['jquery']->src ) && 0 >= version_compare( $wp_scripts->registered['jquery']->ver, '1.8' ) ) {
    		wp_deregister_script( 'jquery' );
    		wp_register_script( 'jquery', '/wp-includes/js/jquery/jquery.js', array(), '1.8' );
    		wp_enqueue_script( 'jquery' );
    		wp_enqueue_script( 'jquery-migrate' );
        }
    }

    Thanks.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.