This topic has 3 replies, 2 voices, and was last updated 2 hours, 11 minutes ago ago by digitalsphere
I hope this message finds you well. We are currently using the Xstore theme for our online store, where we sell digital products. We have a few problem regarding the checkout process:
Hide Billing Address Field: Since we only sell digital products, we would like to remove the billing address field from the checkout. We only want to retain the following fields:
Email
Phone Number
Full Name
Enable Account Registration and Login: We would like to implement a feature that allows users to register for an account during the checkout process. This will facilitate a smoother experience for our customers when purchasing our digital products.
Could you please provide guidance on how to achieve these modifications? Your assistance would be greatly appreciated.
Thank you for your support!
Hi @digitalsphere,
1. Please add the following code under functions.php file locates in your child theme:
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_city']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_country']);
unset($fields['billing']['billing_state']);
// Add or remove fields as needed
return $fields;
}
Or if you don’t want to use the custom code, you can try with this 3rd party plugin: https://wordpress.org/plugins/woo-checkout-field-editor-pro/
2. **Enable Account Registration and Login**: To allow users to register for an account during the checkout process, you can enable this feature from your WordPress dashboard. Go to WooCommerce > Settings > Accounts & Privacy, and check the option to “Allow customers to create an account during checkout.” This setting will add the registration fields to your checkout page.
If you need further customization or encounter any issues implementing these changes, please do not hesitate to contact us.
Best Regards,
8Theme’s Team
Hello thanks for reply
we tried all the solutions : custom code , plugins and we faild to hide the billing address field
we need more help
You must be logged in to reply to this topic.Log in/Sign up