• Resolved gore.m

    (@gorem)


    Hello,
    I’m using Autoptimize 2.7.2 and I have Woo Cart and Checkout optimized everytime. I’m not using any caching plugin and I tried check or uncheck Also optimize shop cart/ checkout? without any effect.

    Thanks you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Some questions:
    * when you disable “optimize cart/ checkout” and you save and then re-open the AO settings page, does the option remain unchecked?
    * does your host do page caching by any chance?
    * can you share your site’s URL?

    frank

    Thread Starter gore.m

    (@gorem)

    1) Yes. Checking / unchecking works as I would expect. (Additionally – there is not any error in DevTools Console).
    2) As I know it shouldn’t.
    3) kvetiny-floris.cz

    Thanks you
    Tom

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I *think* there is a plugin or code snippet (or your theme) using the API incorrectly and forcing the noptimize flag to true (because the condition in the snippet was not met, my example snippet has that problem even so one can blame me ?? ). Are you using any code snippets that you know of? If not can you disable plugins to see if you can identify a culprit?

    Thread Starter gore.m

    (@gorem)

    Aaaaaggrr! Yes, you are right.

    I’m using this code to exclude one page (but it is affecting cart and checkout too). It worked until update, what is wrong with it?

    add_filter('autoptimize_filter_noptimize','noptimize_quiz',10,0);
    function noptimize_quiz() {
    	if (strpos($_SERVER['REQUEST_URI'],'/doporucene-produkty')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    Thanks you
    Tom

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    simply change it to;

    
    add_filter('autoptimize_filter_noptimize','noptimize_quiz',10,1);
    function noptimize_quiz($flag_in) {
    	if (strpos($_SERVER['REQUEST_URI'],'/doporucene-produkty')!==false) {
    		return true;
    	} else {
    		return $flag_in;
    	}
    }
    Thread Starter gore.m

    (@gorem)

    It works ,-) thanks you

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    It works ,-)

    happy to hear so, i’ll now go and update the examples ??

    thanks you

    you’re welcome, feel free to leave a review of the plugin and support here! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Woo Cart and Checkout optimized everytime’ is closed to new replies.