Set customer default tax location in WooCommerce

Set customer default tax location in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'woocommerce_get_tax_location', 'wc_customer_default_tax_location', 9999, 3 );
 
function wc_customer_default_tax_location( $location, $tax_class, $customer ) {
    if ( $customer && ! $customer->get_billing_country() ) {
        return array( 'US', '', '', '' );
    }
    return $location;
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.