Support » Plugin: Autoptimize » woocommerce & autoptimizer https issue

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Frank Goossens

    (@futtta)

    OK, problem indeed is that Autoptimize forces the aggregated & minimized js & css-files to be served over HTTP (or rather, it uses the WP_CONTENT_URL from wordpress, which tends to be http://abc.xyz/wp-content/ instead fo https://abc.xyz/wp-content/)

    easy fix: go into your wordpress admin and change the URL in site address and/or wordpress address from HTTP into HTTPS (or is it HTTPS already?).

    better fix (and will include something like this in the next version which I’m working on): open wp-content/plugins/autoptimize/autoptimize.php and from line 17 change

    //Plugin constants
    define('AUTOPTIMIZE_CACHE_DIR',WP_CONTENT_DIR.'/cache/autoptimize/');
    define('AUTOPTIMIZE_CACHE_URL',WP_CONTENT_URL.'/cache/autoptimize/');
    define('AUTOPTIMIZE_CACHE_DELAY',true);

    into:

    //Plugin constants
    $WP_CONTENT_URL_SSLFIX=(empty($_SERVER['HTTPS'])) ? WP_CONTENT_URL : str_replace("http://", "https://", WP_CONTENT_URL);
    define('AUTOPTIMIZE_CACHE_DIR',WP_CONTENT_DIR.'/cache/autoptimize/');
    define('AUTOPTIMIZE_CACHE_URL',$WP_CONTENT_URL_SSLFIX.'/cache/autoptimize/');
    define('AUTOPTIMIZE_CACHE_DELAY',true);

    and let me know if that solves your aches.

    yes, that did it – thank you so much – i opted to edit the autoptimize.php file as you listed and works great now.

    thanks again!

    Plugin Author Frank Goossens

    (@futtta)

    you’re welcome, thanks for the great rating! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘woocommerce & autoptimizer https issue’ is closed to new replies.