Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joostvanveen/35dda35a79d6be4f562fb2662816fb30 to your computer and use it in GitHub Desktop.
Save joostvanveen/35dda35a79d6be4f562fb2662816fb30 to your computer and use it in GitHub Desktop.
Set firstname, lastname, email, telephone as unrequired for Magento 2
-- DEFAULT MAGENTO: REQUIRE FIRSTNAME, LASTNAME, EMAIL, TELEPHONE
UPDATE `ma2_eav_attribute` SET is_required = 1 WHERE attribute_code = 'firstname';
UPDATE `ma2_eav_attribute` SET is_required = 1 WHERE attribute_code = 'lastname';
UPDATE `ma2_eav_attribute` SET is_required = 1 WHERE attribute_code = 'email';
UPDATE `ma2_eav_attribute` SET is_required = 1 WHERE attribute_code = 'telephone';
-- DO NOT REQUIRE FIRSTNAME, LASTNAME, EMAIL, TELEPHONE
UPDATE `ma2_eav_attribute` SET is_required = 0 WHERE attribute_code = 'firstname';
UPDATE `ma2_eav_attribute` SET is_required = 0 WHERE attribute_code = 'lastname';
UPDATE `ma2_eav_attribute` SET is_required = 0 WHERE attribute_code = 'email';
UPDATE `ma2_eav_attribute` SET is_required = 0 WHERE attribute_code = 'telephone';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment