Your cart is currently empty!
How to reduce items on WooCommerce checkout page
I will show you how to delete unnecessary items on the WooCommerce checkout page. Just put the following code in your theme’s functions.php and save/update. By entering this, all input other than first name, last name, company name (optional), and email address will be deleted. This is ideal if you are selling virtual products. Please feel free to adjust any items you need.
// Remove billing details from woocommerce checkout field
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
unset($fields['order']['order_comments']);
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['billing']['billing_address_2']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_city']);
return $fields;
}
add_filter('woocommerce_enable_order_notes_field', '__return_false');
Comments
Featured products
-
[WAV] Hiphop and Rap Music – Genx Beats
$7.00 or more -
[WAV] Hiphop and Rap Music Vol. 2 – Genx Beats
$7.00 or more -
[WAV] Hiphop and Rap Music Vol. 3 – Genx Beats
$7.00 or more
Leave a Reply