Woocommerce

Eliminar campos del checkout WooCommerce

1 hay 1 solo Like :)

Con este bloque de código podremos eliminar los campos que se encuentran en nuestro formulario de checkout
No olvides que este bloque de código va en el archivo functions.php

add_filter( 'woocommerce_checkout_fields', 'marcode_remove_fields', 9999 );

function marcode_remove_fields( $fields) {
   // unset( $fields['billing']['billing_company'] );
   // unset( $fields['billing']['billing_country'] );
   // unset( $fields['billing']['billing_address_1'] );
   // unset( $fields['billing']['billing_address_2'] );
   // unset( $fields['billing']['billing_city'] );
   // unset( $fields['billing']['billing_state'] );
   // unset( $fields['billing']['billing_postcode'] );
   // unset( $fields['billing']['billing_first_name'] );
   // unset( $fields['billing']['billing_last_name'] );
   // unset( $fields['billing']['billing_phone'] );
   // unset( $fields['billing']['billing_email'] ); 

   unset( $fields['order']['order_comments'] ); // Remover notas de las ordenes

   return $fields;
}