-
Author
-
April 19, 2017 at 19:55 #158961fabianno0572Participant
Hello,
I find that Billing Details of Woocommerce is making almost all of the fields compulsary.
As my business is cash term and is providing personal service, I do provide cash term service. Most of my clients will make appointment with me via appointment plugin before they come to me.
How can I make only a few fields in Billing Details compulsary?
I need only :
1. First Name
2. Last Name
3. Phone
4. Email Address
April 20, 2017 at 22:42 #159151LauraModeratorHello, please try by adding this to functions.php of child theme found at wp-contents/themes at FTP or your hosting file manager 🙂
COPY CODEadd_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); function custom_override_checkout_fields( $fields ) { unset($fields['billing']['billing_company']); unset($fields['billing']['billing_address_1']); unset($fields['billing']['billing_address_2']); unset($fields['billing']['billing_city']); unset($fields['billing']['billing_postcode']); unset($fields['billing']['billing_country']); unset($fields['billing']['billing_state']); unset($fields['billing']['billing_phone']); unset($fields['order']['order_comments']); unset($fields['billing']['billing_address_2']); unset($fields['billing']['billing_postcode']); unset($fields['billing']['billing_company']); unset($fields['billing']['billing_city']); return $fields; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
-
AuthorPosts
You must be logged in to reply to this topic.