diff -Nuar a/vendor/magento/module-customer-custom-attributes/Block/Checkout/AttributeMerger.php b/vendor/magento/module-customer-custom-attributes/Block/Checkout/AttributeMerger.php
index 69c4572a749..160cd621340 100644
--- a/vendor/magento/module-customer-custom-attributes/Block/Checkout/AttributeMerger.php
+++ b/vendor/magento/module-customer-custom-attributes/Block/Checkout/AttributeMerger.php
@@ -104,7 +104,7 @@ class AttributeMerger extends CheckoutAttributesMerger
$providerName = $result['provider'];
- if ($attributeConfig['formElement'] === 'select') {
+ if (in_array($attributeConfig['formElement'], ['select', 'multiselect'])) {
$result['deps'] = [$providerName];
$result['exports']['options'] =
'index = ' . $providerName . ':customAttributes.' . $attributeCode;
diff -Nuar a/vendor/magento/module-customer-custom-attributes/Model/CustomerAddressCustomAttributesProcessor.php b/vendor/magento/module-customer-custom-attributes/Model/CustomerAddressCustomAttributesProcessor.php
new file mode 100644
index 00000000000..3c4aa6817a6
--- /dev/null
+++ b/vendor/magento/module-customer-custom-attributes/Model/CustomerAddressCustomAttributesProcessor.php
@@ -0,0 +1,38 @@
+getCustomAttributes();
+ if ($customerCustomAttributes) {
+ foreach ($customerCustomAttributes as $customAttribute) {
+ $customAttributeValue = $customAttribute->getValue();
+ if ($customAttributeValue && is_array($customAttributeValue)) {
+ if (!empty($customAttributeValue['value'])) {
+ $customAttribute->setValue($customAttributeValue['value']);
+ }
+ }
+ }
+ }
+ }
+}
diff -Nuar a/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessCustomCustomerAttributes.php b/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessCustomCustomerAttributes.php
new file mode 100644
index 00000000000..09287d3c63c
--- /dev/null
+++ b/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessCustomCustomerAttributes.php
@@ -0,0 +1,49 @@
+getCustomAttributes();
+ if ($customerCustomAttributes) {
+ foreach ($customerCustomAttributes as $customAttribute) {
+ $customAttributeValue = $customAttribute->getValue();
+ if ($customAttributeValue && is_array($customAttributeValue)) {
+ if (!empty($customAttributeValue['value'])) {
+ $customAttribute->setValue($customAttributeValue['value']);
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff -Nuar a/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessCustomerBillingAddressCustomAttributes.php b/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessCustomerBillingAddressCustomAttributes.php
new file mode 100644
index 00000000000..49e73db5996
--- /dev/null
+++ b/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessCustomerBillingAddressCustomAttributes.php
@@ -0,0 +1,54 @@
+customerAddressCustomAttributesProcessor = $customerAddressCustomAttributesProcessor;
+ }
+
+ /**
+ * Process billing custom attribute before save for registered customer
+ *
+ * @param PaymentInformationManagementInterface $subject
+ * @param string $cartId
+ * @param PaymentInterface $paymentMethod
+ * @param AddressInterface|null $billingAddress
+ * @return void
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ public function beforeSavePaymentInformation(
+ PaymentInformationManagementInterface $subject,
+ string $cartId,
+ PaymentInterface $paymentMethod,
+ AddressInterface $billingAddress = null
+ ): void {
+ if ($billingAddress) {
+ $this->customerAddressCustomAttributesProcessor->execute($billingAddress);
+ }
+ }
+}
diff -Nuar a/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessGuestBillingAddressCustomAttributes.php b/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessGuestBillingAddressCustomAttributes.php
new file mode 100644
index 00000000000..0ead39b39fe
--- /dev/null
+++ b/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessGuestBillingAddressCustomAttributes.php
@@ -0,0 +1,56 @@
+customerAddressCustomAttributesProcessor = $customerAddressCustomAttributesProcessor;
+ }
+
+ /**
+ * Process billing custom attribute before save for guest
+ *
+ * @param GuestPaymentInformationManagementInterface $subject
+ * @param string $cartId
+ * @param string $email
+ * @param PaymentInterface $paymentMethod
+ * @param AddressInterface|null $billingAddress
+ * @return void
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ public function beforeSavePaymentInformation(
+ GuestPaymentInformationManagementInterface $subject,
+ string $cartId,
+ string $email,
+ PaymentInterface $paymentMethod,
+ AddressInterface $billingAddress = null
+ ): void {
+ if ($billingAddress) {
+ $this->customerAddressCustomAttributesProcessor->execute($billingAddress);
+ }
+ }
+}
diff -Nuar a/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessGuestShippingAddressCustomAttributes.php b/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessGuestShippingAddressCustomAttributes.php
new file mode 100644
index 00000000000..6aacf6bbaa3
--- /dev/null
+++ b/vendor/magento/module-customer-custom-attributes/Model/Plugin/ProcessGuestShippingAddressCustomAttributes.php
@@ -0,0 +1,52 @@
+customerAddressCustomAttributesProcessor = $customerAddressCustomAttributesProcessor;
+ }
+
+ /**
+ * Process shipping custom attribute before save for guest
+ *
+ * @param GuestShippingInformationManagementInterface $subject
+ * @param string $cartId
+ * @param ShippingInformationInterface $addressInformation
+ * @return void
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ public function beforeSaveAddressInformation(
+ GuestShippingInformationManagementInterface $subject,
+ string $cartId,
+ ShippingInformationInterface $addressInformation
+ ): void {
+ $shippingAddress = $addressInformation->getShippingAddress();
+ if ($shippingAddress) {
+ $this->customerAddressCustomAttributesProcessor->execute($shippingAddress);
+ }
+ }
+}
diff -Nuar a/vendor/magento/module-customer-custom-attributes/etc/di.xml b/vendor/magento/module-customer-custom-attributes/etc/di.xml
index 54590b959cd..1a3c11de218 100644
--- a/vendor/magento/module-customer-custom-attributes/etc/di.xml
+++ b/vendor/magento/module-customer-custom-attributes/etc/di.xml
@@ -81,4 +81,16 @@
Magento\CustomerCustomAttributes\Block\Checkout\AttributeMerger
+
+
+
+
+
+
+
+
+
+
+
+