Files to exclude from optimization

Last modified:

If you are using some kind of optimization feature, there are files that need to be excluded from any caching or concatenating.

For Klarna for WooCommerce, you need to exclude the following files:

  • wp-content/plugins/klarna-payments-for-woocommerce/assets/js/klarna-payments.js
  • wp-content/plugins/klarna-payments-for-woocommerce/Blocks/Payment/build/klarna-payments-block.css
  • wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/klarna-onsite-messaging/src/assets/js/klarna-onsite-messaging.js
  • js.playground.klarna.com
  • js.klarna.com
  • cdn.klarna.com
  • x.klarnacdn.net

In some cases, you might also need to exclude these files:

  • wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/klarna-express-checkout/assets/js/kec-cart.js
  • wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/klarna-express-checkout/assets/css/kec-cart.css

On-site messaging was included in Klarna for WooCommerce as of version 3.5.0, and the list above has been updated accordingly. This means that you will need to update your list of excluded files if you haven’t done so after the release of version 3.5.0.

One common issue is that On-site messaging is not visible, or the information in the widget is not updated. This usually happens when HTML, JS, or CSS files are being cached or optimized, which prevents the files from loading correctly.