-
Anonymous
Hi,
How can I remove phone and apartment fields from checkout (see attached)Thanks in advance
-
Alvind
Hi there,
Try adding this snippet:
add_filter( 'woocommerce_checkout_fields', 'remove_checkout_fields' ); function remove_checkout_fields( $fields ) { // Remove apartment/suite field unset($fields['billing']['billing_address_2']); unset($fields['shipping']['shipping_address_2']); // Remove phone field unset($fields['billing']['billing_phone']); return $fields; }Adding PHP: https://docs.generatepress.com/article/adding-php/
-
Anonymous
Hi,
Thanks for your response. Have added the code in snippets but there is no change.Best regards
-
You don’t need the code.
Your checkout page is using Woocommerce’s block template, it has the option to disalbe the line 2 address:
https://app.screencast.com/1Q1SxuBsJpgKu -
Anonymous
Thanks so much!
-
You are welcome 🙂
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.