Cherry Framework theme, JQuery is using HTTP not HTTPS

My site is using Cherry Framework theme. I changed the site to use https but there is still one jquery script which is obviously hardcoded because it's still using http.

I have searched all files in theme directory and in cherry plugin directory as well but never found that line of a script.

Can I still overwrite it somehow to use https?

Topic framework jquery Wordpress

Category Web


If the script is enqueued using wp_enqueue_script (as it "should" be) then you can modify the tag directly with a find and replace match to fix this using the script_loader_tag filter:

add_filter('script_loader_tag', 'custom_https_fix', 10, 2);
function custom_https_fix($tag, $handle) {
    $match = 'jquery.script.js'; // replace with actual script filename
    if (strstr($tag, $match)) {$tag = str_replace('http://', 'https://', $tag);}
    return $tag;
}

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.