/*
Theme Name: Borbila
Theme URI: https://example.com/
Description: Child theme for Hello Elementor
Author: Your Name
Author URI: https://example.com/
Template: hello-elementor
Version: 1.0.0
Text Domain: borbila
*/

/* Custom CSS goes below */

add_filter('woocommerce_checkout_fields', 'remove_unwanted_checkout_fields', 20, 1);
function remove_unwanted_checkout_fields($fields){
    // Remove email & all default billing fields
    unset($fields['billing']['billing_email']);
    unset($fields['billing']['billing_company']);
    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_country']);

    return $fields;
}

// Remove default WooCommerce address fields too
add_filter('woocommerce_default_address_fields', 'remove_default_address_fields', 20, 1);
function remove_default_address_fields($fields){
    unset($fields['city']);
    unset($fields['state']);
    unset($fields['postcode']);
    unset($fields['country']);
    return $fields;
}