M2.4.5, v1.4.2: Not work with default Magento's Gender attribute

Created by Esther Nguyen, Modified on Sun, 19 Apr at 1:02 AM by Support Agent

ISSUE:

I have installed BSS customer attribute extension in my testing env and set some attributes in the registration form. It does work fine. However, I've also enabled the default Magento's customer attribute - Gender. It becomes unable to save within the customer edit page. 



SOLUTION:

Unfortunately, our module has not worked properly with the default Gender attribute


To resolve the issue, please edit the file app/code/Bss/CustomerAttributes/Plugin/Model/Metadata/Form.php as below:

     public function afterGetAllowedAttributes($subject, $result)
     {
         $page = $this->request->getFullActionName();
-        $attributeDefault = ['firstname', 'lastname', 'email', 'password', 'taxvat'];
+        $attributeDefault = ['firstname', 'lastname', 'middlename', 'email', 'password', 'taxvat', 'gender', 'dob'];
         if ($page == 'customer_account_editPost'
             && $this->customerAttribute->getConfig('bss_customer_attribute/general/enable')
         ) {


If you need any further assistance, please feel free to contact us. We'd be happy to support you!


Reach us now!!


BSS Commerce is a full-service ecommerce agency with 14+ years of experience, supporting 75,000+ customers worldwide. As an Adobe Commerce Solution Bronze Partner and Select Magento Extensions Builder, we deliver trusted end-to-end solutions.


Our core strength is Magento, with 150+ extensions designed to enhance store performance and drive growth. With deep expertise from years of working on Magento websites, we deliver scalable, high-impact solutions backed by strong client trust.


Discover our extensions: https://bsscommerce.com/magento-2-extensions.html 


Our Magento B2B Extension by BSS Commerce is a flagship, widely used global solution, providing an all-in-one system for pricing, account management, and efficient B2B workflows.


Please don't hesitate to contact us if you need any further support.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article