Closed didkan closed 2 months ago
Fixed in #587.
Thank you!
@mntzrr Thanks for the quick merge! Glad to be able to help out. When can I expect this to be added to a new release?
Since this will affect all new merchants (or API keys), this warrant a new release sometime early next week.
Tested with plugin version 2.12.4
Klarna has apparently change their
Key ID
format from something likeK529269_6e7be3f4fedf
to using UUID e.g.2faf6b4e-a7cd-4be4-8b7f-8f3013b8e805
. The new UUID format is not accepted by the js validation of this plugin when trying to change Klarna credentials in the plugin settings. See error message below:The culprit is this line of code:
https://github.com/krokedil/klarna-checkout-for-woocommerce/blob/7e102cf20b711b3a2f0b0f5fa74c6e44670474f9/assets/js/klarna-checkout-for-woocommerce-admin.js#L57
A suggested fix is to extend the regexp to allow for UUID strings in addition to the old format: