Skip to content
Advertisement

How to make Woocommerce checkout field not required if checkbox is checked?

In WordPress Woocommerce checkout page I want to make field ‘billing_name’ not required if checkbox ‘buy_on_company’ is checked.

I have managed to hide ‘billing_name’ in checkout page, but how to make it not required also?

JavaScript
JavaScript

Advertisement

Answer

I have done this:

JavaScript

Now it doesn’t ask for billing name field.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement