Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Billing city does not match Klarna order. #605

Open
aramayisd opened this issue Jul 29, 2024 · 6 comments
Open

Billing city does not match Klarna order. #605

aramayisd opened this issue Jul 29, 2024 · 6 comments
Assignees

Comments

@aramayisd
Copy link

aramayisd commented Jul 29, 2024

Description of the issue

Hello @mntzrr — I am the developer of AraratButik.com (which has the same issue).
When we updated the plugin version from 2.12.5 till 2.12.9 in mobilfastfix.se — the checkout page stops working and we receiving the following error.

Billing address 1 does not match Klarna order. 
Billing city does not match Klarna order.

It looks like something break between that releases, no all users has this issue, but a couple websites already have this bug.
I commented the following line in plugin source code, and it help. (so now 2.12.9 works)

File: classes/class-kco-gateway.php

// add_action( 'woocommerce_after_checkout_validation', array( $this, 'validate_checkout' ), 10, 2 );

It looks like it's a recently change.
Could you please check?

We tried to set "Defaults to the customer's billing address" and "Force delivery to the customer's billing address" but it doesn't help.


Expected behavior

After click on Betala köp the checkout pop up should open and then Bekräfta och betala.


Actual behavior

When we click on Betala köp it opens a window and say the following

Billing address 1 does not match Klarna order. 
Billing city does not match Klarna order.

Steps to reproduce the behavior

  1. Add an item in basket
  2. Go to checkout page
  3. Fill all fields and click Betala köp

Klarna plugin version

2.12.19


WordPress version

6.5.2


WooCommerce version

8.5.2

Screenshots

image
image
image

@mntzrr mntzrr self-assigned this Jul 30, 2024
@mntzrr
Copy link
Contributor

mntzrr commented Jul 30, 2024

Hello @aramayisd !

Thanks for reporting this issue.

We introduced in 2.12.6 additional controls where we compare and check that the billing fields in both Klarna and Woo matches. However, as you've reported, we did notice that some merchant has opted to remove these standard Woo fields. I've confirmed that this is also the case for your store (please see attachment). As you can see, the "billing_city" and "billing_address_1" fields are missing.

While disabling the validate_checkout callback will solve the issue for you, I highly discourage doing so since we introduced it to prevent fraud. I suggest that you enable these standard Woo fields again, while we're working on a general solution to adjust for missing standard fields.

@aramayisd
Copy link
Author

Hey @mntzrr, thank you for your reply.

However, as you've reported, we did notice that some merchant has opted to remove these standard Woo fields. I've confirmed that this is also the case for your store (please see attachment). As you can see, the "billing_city" and "billing_address_1" fields are missing.

Do you know how we can enable this fields billing_city and billing_address_1 — until general solution to adjust for missing standard fields will be ready.

Thank you.

@mntzrr
Copy link
Contributor

mntzrr commented Aug 2, 2024

The fields must be unset manually. This is not something you can do in WooCommerce without either using a third-party plugin or the woocommerce_checkout_fields filter hook. That is, someone must have disabled them.

From my experience, I've found people disabling them from their theme's functions.php file. The most common plugin for unsetting these fields is "Checkout Field Editor" by ThemeHigh. I suggest checking for these. If that still fails, try disabling all the plugins, and enable them by one. Examine the checkout every time to see if the fields have been restored. Finally, try switching theme. If the fields are restored, then most likely it is disabled through the theme's functions.php.

@aramayisd
Copy link
Author

I understand, ok thank you.

@mntzrr
Copy link
Contributor

mntzrr commented Aug 7, 2024

No problem! I'll keep this issue open for a while, while we decide on how we should proceed from here. I'll post an update once we've reached a conclusion or refer to a fix.

@wezzou1
Copy link

wezzou1 commented Aug 26, 2024

I have the same problem in Klarna Checkout, the customers having trouble to checkout, it worked before update.

"Shipping method have been changed during the checkout process"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants