Js doesn’t loaded
-
With WP 5.6.x version all js files that depends on jQuery doesn’t get loaded.
That’s because in your plugin’s file you still check the previous jQuery slug. So since WP 5.6 load the dependency with the new ‘jquery-core’ slug you should dynamically edit this behavoiur like this way:
global $wp_version; if ( version_compare( $wp_version, '5.6', '>=' ) ) { $jquery_slug = array('jquery-core'); } else { $jquery_slug = array('jquery'); } wp_enqueue_script( 'dtpicker', plugins_url( 'assets/js/vendor/datetimepicker/jquery.datetimepicker.full.min.js', dirname( __FILE__ ) ), $jquery_slug, $version, true );
Please fix this as you desire.
Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Js doesn’t loaded’ is closed to new replies.