Viewing 1 replies (of 1 total)
  • Yeah, problem for me too. Here’s my solution, that should work with any wp_enqueue_script scripts.

    function mynamespace_fix_ssl(){
        global $wp_scripts;
    
        if (is_ssl()){
            // search the registered scripts for any that will load as insecure content
            foreach ((array) $wp_scripts->registered as $script) {
                // only fix if source URL starts with https://
                if (stripos(ltrim($script->src), 'https://') === 0)
                    $script->src = str_ireplace('https://', 'https://', $script->src);
            }
        }
    
    } add_action('wp_print_scripts', 'mynamespace_fix_ssl', 100);

    Credit to SSL Insecure Content Fixer for a few of the lines.

Viewing 1 replies (of 1 total)
  • The topic ‘https errors from this plugin’ is closed to new replies.