How to overright plugin file's js in child theme
Answers (1)
Add AnswerTo override the plugin js files in the child theme you can follow the same process as described in the above step.
But we can use another way to achieve this which is to deregister the old script and then enqueue the new one with the same handler.
I have tried this thing with an inquiry plugin js files.
add_action('wp_enqueue_scripts', 'enquiry_cart_scripts'); function enquiry_cart_scripts() { wp_dequeue_script( 'gmwqp-script' ); wp_deregister_script( 'gmwqp-script' ); wp_enqueue_script( 'gmwqp-script', MY_CHILD_URI . 'assets/js/enquiry.js', array('jquery'), '', true ); }