Answer the question
In order to leave comments, you need to log in
Woocommerce checkout page customization?
Good day! I ask experts for help, I need to remove several unnecessary imputs from the payment form when placing an order, how can this be done without installing plugins? Here is this form opt.trendtoys.ru/checkout where you need to remove the index, last name, etc.
Answer the question
In order to leave comments, you need to log in
add_filter( 'woocommerce_checkout_fields' , 'remove_checkout_fields' );
function remove_checkout_fields( $fields ) {
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
unset($fields['billing']['billing_city']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_country']);
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_phone']);
unset($fields['order']['order_comments']);
unset($fields['billing']['billing_email']);
unset($fields['account']['account_username']);
unset($fields['account']['account_password']);
unset($fields['account']['account_password-2']);
return $fields;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question