Hi @vegetaca,
Thanks for the feedback.
You can remove shipping or billing fields with the code snippets below.
/**
* Remove some shipping fields.
*
* @param array $fields Fields used in checkout.
*/
function fluidcheckout_remove_shipping_fields( $fields ) {
// unset( $fields[ 'shipping_first_name' ] );
// unset( $fields[ 'shipping_last_name' ] );
// unset( $fields[ 'shipping_company' ] );
// unset( $fields[ 'shipping_phone' ] );
// unset( $fields[ 'shipping_address_1' ] );
// unset( $fields[ 'shipping_address_2' ] );
// unset( $fields[ 'shipping_city' ] );
// unset( $fields[ 'shipping_state' ] );
// unset( $fields[ 'shipping_country' ] );
unset( $fields[ 'shipping_postcode' ] );
return $fields;
}
add_filter( 'woocommerce_shipping_fields', 'fluidcheckout_remove_shipping_fields', 300 );
/**
* Remove some billing fields.
*
* @param array $fields Fields used in checkout.
*/
function fluidcheckout_remove_billing_fields( $fields ) {
// unset( $fields[ 'billing_first_name' ] );
// unset( $fields[ 'billing_last_name' ] );
// unset( $fields[ 'billing_company' ] );
// unset( $fields[ 'billing_phone' ] );
// unset( $fields[ 'billing_address_1' ] );
// unset( $fields[ 'billing_address_2' ] );
// unset( $fields[ 'billing_city' ] );
// unset( $fields[ 'billing_state' ] );
// unset( $fields[ 'billing_country' ] );
unset( $fields[ 'billing_postcode' ] );
return $fields;
}
add_filter( 'woocommerce_billing_fields', 'fluidcheckout_remove_billing_fields', 300 );
If you need to remove other fields, uncomment the respective lines. Otherwise, you can remove the commented code.
If you are unsure about how to add the code snippet, check our article:
How to safely add code snippets to your WooCommerce website
Please note that other plugins, such as payment methods, might need the postcode or other address fields to work properly.
Best,
Diego