fahimmurshed

Remove Astra WooCommerce filed

Mar 27th, 2020 (edited)
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields_by_bsf', 99 );
  2. // Remove some fields from billing form
  3. // Fahim MUrshed https://fahimm.com
  4. // Our hooked in function - $fields is passed via the filter!
  5. // Get all the fields - https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
  6. // Refer to this tutorial - https://wpbeaches.com/remove-address-fields-in-woocommerce-checkout/
  7. function custom_override_checkout_fields_by_bsf( $fields ) {
  8.      unset($fields['billing']['billing_address_2']);
  9.      
  10.     //  You can remove others files just uncomment //
  11.  
  12.     // unset($fields['billing']['billing_company']);
  13.     // unset($fields['billing']['billing_address_1']);
  14.     // unset($fields['billing']['billing_postcode']);
  15.     // unset($fields['billing']['billing_state']);
  16.  
  17.      return $fields;
  18. }
Add Comment
Please, Sign In to add comment