wp_enqueue_script silently fails [closed]

Basic JS troubleshooting – strip it down to basics. Create a new script which either has a console.log('I am working') or alert('I am working') and enqueue it without any dependencies. If it works, enqueue it with your dependencies – still with your console or alert to easily check whether it’s working. If it works, now you can do a really simple function with the datepicker you really want to use in your script. Once that works, put in your more complex custom code.

Another common thing to check – what version of jQuery does your version of Datetimepicker require, and what is loading in your version of WP? Perhaps they’re not compatible.

tech