Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Jason Atkinson
Jason Atkinson
26,245 Points

woocommerce: checkout fields, remove

hay, long time user.

just struggling with something and thought one of you lovely people can help. im using woocommerce and i want to customise the checkout page i wanted to remove the company name and the phone fields, i looked up the documentation and added this:

unset($address_fields['company']);

and it worked HOWEVER.

unset($address_fields['billing_phone']);

didnt seem to want to remove it however it does appear that it turned it from required = true to required = false? whats going on here? i just want to remove the phone field?

if anyone has suggestions? I could use css just to display none but that feels like cheating