Change record status: 
Project: 
Introduced in branch: 
8.x-2.x
Introduced in version: 
8.x-2.14
Description: 

Commerce 2.14 now has an address book, allowing customer information (billing/shipping) to be saved and then used on next purchase.
This UI works in the order admin UI, and at checkout.

An address book is a collection of profile entities belonging to a customer. Profiles can be of different types, and customers have a default profile for each type. Anonymous profiles (uid: 0) belong to a parent entity (order, shipment, payment method) and maintain a record of customer information for use in that entity's context. They are not part of an address book but can be copied to be saved to a customer's address book.

We separate profiles in this manner to ensure data integrity. Modifying a payment method's billing profile (e.g. from the user pages) must not modify orders that were placed using that payment method. Modifying one order's shipping profile must not modify another order's shipping profile. That's why each order/shipment/payment method needs to have its own profile, which are then populated from an address book profile, and vice-versa.

To ensure a clean slate, Commerce 2.14 starts with an empty address book, by assigning all existing customer profiles to uid 0.
You can use the patch in #3066454: Add a Drupal Console command with an extended address book upgrade path to repopulate the address book with each customer's most recently used profile.

Also note that some on-site gateways have a bug which breaks the user/{user}/payment-methods add/edit form, because clicking the "Save" button is interpreted as clicking the address book "Edit" button. We are tracking the possibly affected gateways here: #3077506: [meta] On site payment gateways with broken add/edit form.
The bug has already been fixed in Commerce Authorize.net 1.2.

Developers wishing to modify the address book form can do so from hook_commerce_inline_form_alter().

Impacts: 
Site builders, administrators, editors
Module developers