Well, if you ever want to revisit; this is fixable in multiple ways actually @jumper 🙂
frank
Thread Starter
jumper
(@jumper)
Really?? That’s great! How do I do that?
Thanks!
well, one possiblity: if I’m not mistaking “Klarna Checkout” hooks into WooCommerce, in which case you could untick the option “also aggregate your cart/ checkout” in AO’s advanced options.
alternatively you could use a code like this one to exclude AO on one (or more) specific URL’s (in below example the klarna checkout is on URL /klarna/checkout);
add_filter('autoptimize_filter_noptimize','klarna_noptimize',10,0);
function klarna_noptimize() {
if (strpos($_SERVER['REQUEST_URI'],'klarna/checkout')!==false) {
return true;
} else {
return false;
}
}
there are probably other solutions (e.g. excluding the klarna JS from AO JS optimization) but I would need to see the checkout for that.
let me know if this helps 🙂
frank
have you been able to look into the above @jumper? 🙂
Thread Starter
jumper
(@jumper)
Yes. I had to use both: 1) untick the “aggregate cart” option in Advanced settings, and 2) Paste the filter code you sent in my child theme’s functions.php to solve this problem.
Thank you!
you’re welcome @jumper, thank you for the updated review score 🙂