• Hi there,

    I live in the state of North Carolina where it’s very important to charge the correct local sales tax by zip code (in addition to statewide state sales tax).

    My problem is that the default WooCommerce function for “Shop Base Location” only gets as specific as the state location. So when someone chooses “Local Pickup” they are charged STATE sales tax but not LOCAL sales tax.

    Does anyone know a creative solution around this?

    In my tax settings, I have configured 3 different priority levels of tax rates for State Tax, Local Tax and a 3rd Transit Tax which some cities add as well. In a perfect would, I would like to put in my shop’s entire address, so the tax based on my base location would include city and zip code as well.

    Unfortunately my local tax is higher than some of the other local taxes in the state, so configuring mine as the default state tax rate as a workaround is not a viable solution.

    I am having trouble finding support articles on this because when I google it, everything points to the configuration of the base location under WooCommerce settings, which of course is very simple — however inadequate if you are in a state with horrible sales tax requirements like North Carolina!!

    Thanks for ANY HELP you can provide! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    I’m seeing this behavior too, using the latest version of Woocommerce Version 2.4.12.

    When there are state, county, and city taxes defined only the state tax gets applied to orders who choose “Local pickup” as a shipping option.

    If a customer choose a standard shipping option all the taxes get applied to the order.

    I’m checking into this more but don’t have a solution yet…

    Apparently the recommended solution is to use this paid add-on local pickup plus.

    https://docs.woothemes.com/document/local-pickup-plus/

    I tried setting “Calculate tax based on customer billing address” and it still only charges state tax when choosing Local Pickup.

    It seems like there should be an option within the “General” store settings to enter the complete store address to calculate tax accurately.

    To charge local taxes based on postcode and city for Local Pickup, you need to define the shop’s base city and post code add the following code at the end of your functions.php file (change the zip code, city accordingly):

    add_filter( ‘woocommerce_countries_base_postcode’, create_function( ”, ‘return “80903”;’ ) );
    add_filter( ‘woocommerce_countries_base_city’, create_function( ”, ‘return “COLORADO SPRINGS”;’ ) );

    ____________________________________________

    If you need zip code level tax rate table, please try the one on https://www.woosalestax.com. Their zip code level sales rate tables are very compact and won’t slow down your website.

    Hope this help!

    jameswirth

    (@jameswirth)

    Hello, is this code still valid? I attempted to add it to the end of my functions.php file, and it crashed the site. I tried a few variations, with no luck. I did of course, updated zipcode and city. I also tried leaving it as written with no edits. Still no luck…

    tenfosolutions

    (@tenfosolutions)

    The code should still work.

    Make sure you set your Calculate Tax Based On option to “Shop Base Address”

    and try just using the first line of code that look up the zip code instead of the city and have the rate setup for that zip code on your sales tax rate table. Good luck.

    @jameswirth, I got it figured out.

    1) Those double-quotes should be two single quotes
    2) The posted code includes curly quotes and everything needs switched to straight quotes
    3) This code is unnecessarily backwards compatible with PHP 5.2
    4) Keep setting at “Customer Shipping Address”

    Here’s the code I used:

    add_filter( 'woocommerce_countries_base_postcode', function () {
    	return'80903';
    } );
    add_filter( 'woocommerce_countries_base_city', function () {
    	return'COLORADO SPRINGS';
    } );
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WooCommerce Not Calculating Correct Local Tax for Local Pickup (Only State Tax)’ is closed to new replies.