SOLVED: [Woo] Removed checkout field is still required and causes an error at checkout

Bricks Version: 1.5.4

I removed some billing fields from the ‘Checkout customer details’ element but when I test the checkout I get a ‘required field’ error for the ‘phone’ field.

Removed fields: https://imgur.com/a/DqYgWr7

Error: https://imgur.com/a/7b8w2Hr

Am I doing something wrong? I can’t find any mention of this on the forums so I assume it’s an issue on my end?

Hi,
Welcome to the forum, and thanks so much for your report!

I think the problem is that the field is removed but still required. WooCommerce determines which fields are required by default. Please have a look here and test the filter:

Best regards,
timmse

Thanks timmse,

I actually went ahead already and removed the required flag in my function.php and it worked.

It would be nice if Bricks did this automatically when a field is removed if that functionality is possible since it’s only logical that a field not included on a form should be outright ignored.

:slight_smile:

Thanks for checking! Yes, that’s exactly what I think too :slight_smile: I added it to our to-do list.

Hi,
We’ve fixed this bug in Bricks 1.5.7, now available as a one-click update within your WordPress Dashboard.

Please let us know if you are still experiencing issues.

Best regards,
timmse