Update customer billing address within custom pane I am writing a custom CheckoutPaneBase within Commerce 2 that incorporates shipping and billing information. My goal would be to update the customer's billing address, that is stored as billing profile, programmatically. I looked at the billing information Pane and see that they use:
  $billing_profile = $this-&gt;order-&gt;getBillingProfile();
      if (!$billing_profile) {
        $billing_profile = $this-&gt;entityTypeManager-&gt;getStorage('profile')-&gt;create([
          'type' =&gt; 'customer',
          'uid' =&gt; 0,
        ]);
      }
      $billing_profile-&gt;populateFromProfile($payment_method_profile, ['data']);
      $billing_profile-&gt;save();
      $this-&gt;order-&gt;setBillingProfile($billing_profile);

But rather that populate from $payment_method_profile, I would like to add my own fields' values. I am not sure how I can populate an array to push to populateFromProfile or setBillingProfile or the field values.
Any help or hints?
You can update the field value like this:
  $cart_provider = \Drupal::service('commerce_cart.cart_provider');
  $cart = $cart_provider-&gt;getCart('default');
  $billing_profile = $cart-&gt;getBillingProfile();
  $billing_profile-&gt;field_name-&gt;value = 'Hello World';
  $billing_profile-&gt;save();