Files to exclude from optimization

  1. Home
  2. /
  3. Klarna for WooCommerce
  4. /
  5. Troubleshooting
  6. /
  7. Files to exclude from optimization

Files to exclude from optimization

If you are using some kind of optimization feature there are files that needs 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

And perhaps:

  • 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

With the inclusion of On-site Messaging into Klarna for WooCommerce introduced in version 3.5.0, the list above has been updated. This means that you will need to update your list of excluded files if you haven’t done so after the release of KP 3.5.0.

One common issue that might be related to HTML, JS and CSS files being cached/optimized is that Klarna On-site Messaging is not visible, or the information in the widget is not being updated, on the pages due to files not being loaded correctly.