Advertisement
arie_cristianD

remove some woocomerce checkout fields

Feb 29th, 2024
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. function wedevs_remove_checkout_fields( $fields ) {
  2.     unset( $fields['billing']['billing_company'] );
  3.     unset( $fields['billing']['billing_email'] );
  4.     unset( $fields['billing']['billing_phone'] );
  5.     unset( $fields['billing']['billing_state'] );
  6.     unset( $fields['billing']['billing_country'] );
  7.     unset( $fields['billing']['billing_address_1'] );
  8.     unset( $fields['billing']['billing_address_2'] );
  9.     unset( $fields['billing']['billing_city'] );
  10.     unset( $fields['billing']['billing_postcode'] );
  11.  
  12.     return $fields;
  13. }
  14. add_filter( 'woocommerce_checkout_fields', 'wedevs_remove_checkout_fields' );
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement