Created
September 20, 2021 12:22
-
-
Save FrancoStino/7ab8fb48684cad8536750e018015e33d to your computer and use it in GitHub Desktop.
Hide the Company Name Field from the Checkout Page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* @ snippet Hide the Company Name Field from the Checkout Page | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'remove_company_name' ); | |
function remove_company_name( $fields ) { | |
unset($fields['billing']['billing_company']); | |
unset($fields['shipping']['shipping_company']); | |
unset($fields['billing']['billing_address_2']); | |
unset($fields['shipping']['shipping_address_2']); | |
return $fields; | |
} | |
/* ----- */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment