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

[Bug]: Address gets nulled in multi step checkout #91

Open
MassiveHiggsField opened this issue Jun 18, 2024 · 1 comment
Open

[Bug]: Address gets nulled in multi step checkout #91

MassiveHiggsField opened this issue Jun 18, 2024 · 1 comment

Comments

@MassiveHiggsField
Copy link

What happened?

If i activate the multi step checkout, the order gets correctly saved (as partial) on the first step and the address_id will be set correctly. But on the second step when the order gets saved again, the address_id field is set to null.

What did you expect to happen?

The address_id should not get set to null

Version

3.x

What browser are you seeing the problem on?

No response

Relevant log output

No response

@MassiveHiggsField
Copy link
Author

The problem is with this code:

$addressId = null;

On step #2 there won't be any address data in post, so $addressId will stay null and then in line 196 it will be saved to the order object. A quickfix could be to change line 196 to this:

    if (!($order->address_id > 0)) {
        $order->address_id = $addressId;
    }

But i don't know if that has any other implications.

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

1 participant