Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
81 stars 29 forks source link

Copy the shipping phone when creating renewal orders #493

Closed james-allan closed 10 months ago

james-allan commented 11 months ago

Description

This PR adds to the changes made in https://github.com/Automattic/woocommerce-subscriptions-core/pull/492.

In WC 5.6 (released Aug 2021), functions were added to support a shipping phone field (https://github.com/woocommerce/woocommerce/pull/30097). This field has very little support via the default UI however. There's no shipping phone checkout field for example. There is a field shown on the edit order/subscription screen though.

Screenshot 2023-08-07 at 2 45 23 pm
Shipping phone number field on the edit order/subscriptions screen

This shipping phone field wasn't being copied to renewal orders. This PR fixes that.

How to test this PR

  1. Purchase a subscription or create one manually from the admin UI.
  2. Edit the subscription shipping address and add a phone number. (see example screenshot above).
  3. From the subscription actions select Process a renewal and save.
  4. Go to the newly created renewal order screen.
    • On trunk the shipping phone will be empty.
    • On this branch, the shipping phone should be copied from the subscription.

Product impact