Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields_by_bsf', 99 );
- // Remove some fields from billing form
- // Fahim MUrshed https://fahimm.com
- // Our hooked in function - $fields is passed via the filter!
- // Get all the fields - https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
- // Refer to this tutorial - https://wpbeaches.com/remove-address-fields-in-woocommerce-checkout/
- function custom_override_checkout_fields_by_bsf( $fields ) {
- unset($fields['billing']['billing_address_2']);
- // You can remove others files just uncomment //
- // unset($fields['billing']['billing_company']);
- // unset($fields['billing']['billing_address_1']);
- // unset($fields['billing']['billing_postcode']);
- // unset($fields['billing']['billing_state']);
- return $fields;
- }
Add Comment
Please, Sign In to add comment