La seguente funzione, da installare in functions.php, è utile per rimuovere alcuni campi dal Checkout di Woocommerce come in caso di ordini virtuali: add_filter( ‘woocommerce_checkout_fields’ , ‘woocommerce_override_checkout_fields’ ); function woocommerce_override_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_address_2’]); unset($fields[‘billing’][‘billing_postcode’]); unset($fields[‘billing’][‘billing_company’]); unset($fields[‘billing’][‘billing_last_name’]); unset($fields[‘billing’][‘billing_email’]); unset($fields[‘billing’][‘billing_city’]); return $fields; } Seguici su: […]