Summary
$customer->get_billing_address() returns an empty Billing_Address value object for some customer rows in the database, even when the customer was created via a flow that should have captured an address (signup with a non-free product, etc.). The empty value flows through to the customer-panel billing-info element and renders as a blank card with no clear next action.
This was observed for customer id 2 (sthscah) on the local dev environment while debugging the template-switching flow. We have not confirmed whether this is:
- A historical-data artefact (the customer pre-dates the schema field that stores the address), in which case the fix is purely UI — render a friendly "Please add your billing address" prompt with a link to the edit form.
- A genuine save-side bug where a checkout flow fails to persist the address, in which case the fix is on the gateway/checkout side.
- An import path that didn't carry the address forward (e.g. WooCommerce -> Ultimate Multisite migration).
Why a separate issue
#1113 was scoped to template-switching UX, light-ajax fixes, Stripe gateway fixes, and the settings-"false"-string fix. The billing-address rendering is unrelated and non-blocking — putting it in #1113 would have made the review needlessly broader.
Files to inspect
inc/objects/class-billing-address.php — the value object, particularly is_empty() / is_valid() / to_array().
inc/models/class-customer.php — get_billing_address() accessor.
inc/ui/class-billing-info-element.php — renderer used on the customer panel.
inc/gateways/class-base-gateway.php and Stripe/PayPal subclasses — the save-time path that should be writing the address.
Reproduction
- Log in as customer
sthscah (user id 4) in the dev environment.
- Visit the customer-panel "billing info" page.
- Observe the address card renders with no city/postcode/country lines and no "edit" call-to-action — just empty fields.
Suggested investigation
- Inspect the database row directly:
SELECT * FROM wp_wu_customers WHERE id = 2; and look at whether the billing fields are NULL, empty strings, or populated.
- If populated: bug is in the value-object / renderer pipeline.
- If empty: trace back to the customer's signup payment record and check the gateway's
process_signup / customer-update code path.
- Either way, add a defensive empty-state UI in
class-billing-info-element.php so the customer is prompted to fill in their address rather than seeing a confusing blank card.
Severity
Low — display defect, not a billing/charging defect. The customer can still complete a checkout because gateways collect the address fresh at payment time.
Summary
$customer->get_billing_address()returns an emptyBilling_Addressvalue object for some customer rows in the database, even when the customer was created via a flow that should have captured an address (signup with a non-free product, etc.). The empty value flows through to the customer-panel billing-info element and renders as a blank card with no clear next action.This was observed for customer id 2 (
sthscah) on the local dev environment while debugging the template-switching flow. We have not confirmed whether this is:Why a separate issue
#1113 was scoped to template-switching UX, light-ajax fixes, Stripe gateway fixes, and the settings-
"false"-string fix. The billing-address rendering is unrelated and non-blocking — putting it in #1113 would have made the review needlessly broader.Files to inspect
inc/objects/class-billing-address.php— the value object, particularlyis_empty()/is_valid()/to_array().inc/models/class-customer.php—get_billing_address()accessor.inc/ui/class-billing-info-element.php— renderer used on the customer panel.inc/gateways/class-base-gateway.phpand Stripe/PayPal subclasses — the save-time path that should be writing the address.Reproduction
sthscah(user id 4) in the dev environment.Suggested investigation
SELECT * FROM wp_wu_customers WHERE id = 2;and look at whether the billing fields are NULL, empty strings, or populated.process_signup/ customer-update code path.class-billing-info-element.phpso the customer is prompted to fill in their address rather than seeing a confusing blank card.Severity
Low — display defect, not a billing/charging defect. The customer can still complete a checkout because gateways collect the address fresh at payment time.