modify wordpress plugin function in javascript

what you have wrong is the following line $path = get_template_directory_uri();, get_template_directory_uri is used when you are in the parent theme, to get the url path of the child theme you should use get_stylesheet_directory_uri so your code will be as following

function custom_enqueue_js_scripts() {
    $path = get_stylesheet_directory_uri();
    // remove the yith quick view script to queue our hooked version
    wp_enqueue_script('wcfmvm-script-membership-registration', $path . 
   '/wcfm/membership/assets/js/min/wcfmvm-script-membership-registration.js', '', '', true);
add_action('wp_enqueue_scripts', 'custom_enqueue_js_scripts');

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top