Skip to content

Bugfix: Changing Default Addresses#4332

Merged
kennyadsl merged 1 commit intosolidusio:masterfrom
mamhoff:fix-addressbook-update-default-address
Apr 19, 2022
Merged

Bugfix: Changing Default Addresses#4332
kennyadsl merged 1 commit intosolidusio:masterfrom
mamhoff:fix-addressbook-update-default-address

Conversation

@mamhoff
Copy link
Copy Markdown
Contributor

@mamhoff mamhoff commented Apr 12, 2022

Solidus' immutable addresses allow "changing" an address by passing its
ID to the save_in_address_book method. If one does that with an
address that was marked as default shipping or billing of the user, the
old address would be archived, and the new address would not become the
user's default address. This change addresses that by handling that
situation for both default billing and default shipping addresses.

Prerequisite for #3852

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change (if needed)

Solidus' immutable addresses allow "changing" an address by passing its
ID to the `save_in_address_book` method. If one does that with an
address that was marked as default shipping or billing of the user, the
old address would be archived, and the new address would not become the
user's default address. This change addresses that by handling that
situation for both default billing and default shipping addresses.
Copy link
Copy Markdown
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@kennyadsl kennyadsl merged commit ad3b89e into solidusio:master Apr 19, 2022
@kennyadsl
Copy link
Copy Markdown
Member

Thanks @mamhoff!

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

Successfully merging this pull request may close these issues.

4 participants