• Resolved nickroch

    (@nickroch)


    Hello,

    First, I want to point out that I am new to wordpress and website development in general so please forgive my ignorance.

    My issue is with Woocommerce tax calculation not pulling up the correct tax rate for a given customer shipping location.

    I am located in BC Canada. In Canada we have both federal tax (GST) and a provincial tax (PST). Some provinces also have a combined tax called HST. Since each province has a different resultant tax rate, i want the taxes to be based on each customers shipping address.

    I have configured woocommerce to charge tax based on customers shipping address (set in the woocommerce tax settings page). I have also manually created the tax rates for each province (set in the standard rates page).

    Woocommerce seems to be only pulling BC tax rates (my shop home location) regardless of the customers shipping address. I have tested this by creating users with different shipping addresses in other provinces but to no avail, woocommerce only pulls the BC tax rate. when i inspect the elements in the order review page it says its the BC tax rate. if i change the BC tax rate, the amounts are updated accordingly.

    When I change my shop address to a different province, woocommerce does pull the correct tax rate for that province but again it is unaffected by the customer’s shipping address.

    I have tried changing the “default customer location” to see if this helps but affects no change to the tax amounts. I have also tried changing tax calculations based on customer billing address with no change.

    I have also tried disabling all plugins except woocommerce but the issue still occurs.

    my woocommerce is up to date (V3.6.2) and i have disabled all plugins that might be affecting taxes like woocommerce services and woocommerce booster.

    Any advise would be greatly appreciated. i have pent the last 3 days trying to solve this without sucess.

    links to screenshots showing the issue and my settings.

    https://www.petrampvc.ca/wp-content/uploads/2019/05/pst-issue-1.png
    https://www.petrampvc.ca/wp-content/uploads/2019/05/pst-issue-2.png
    https://www.petrampvc.ca/wp-content/uploads/2019/05/pst-issue-3.png
    https://www.petrampvc.ca/wp-content/uploads/2019/05/pst-issue-4.png

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 29 total)
  • When you run tests are you using the and browser you admin the site from?

    I would suggest using a private or incognito browser to test.

    Your settings looked good. I didn’t see anything wrong there.

    Thread Starter nickroch

    (@nickroch)

    Hello!

    Thank you for the quick reply. I am using the same browser as the admin. I will try redoing tests in incognito mode and a different browser and report back.

    Thanks

    • This reply was modified 5 years, 10 months ago by nickroch.

    Cool thanks. Yeah sometimes using the same browser can mess this up. Not always.

    Thread Starter nickroch

    (@nickroch)

    I have retested with no success.

    I tried Chrome incognito mode, firefox and internet explorer.

    all have the same result, only the BC tax is pulled up….

    any thoughts?

    Thank you!

    Ok. Let’s review here and be sure to have everything setup as stated.

    Thread Starter nickroch

    (@nickroch)

    Hi again,

    yes, everything has been set up correctly per the document.

    I took a peek at the code from the woocommerce order review template. I am pretty ignorant so dont know if this is relavent but i dont see the part of the code where it checks the customers address before pulling up the rate rate… code below.

    <?php if ( wc_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) : ?>
    <?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
    <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
    <tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
    <th><?php echo esc_html( $tax->label ); ?></th>
    <td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
    </tr>
    <?php endforeach; ?>
    <?php else : ?>
    <tr class="tax-total">
    <th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
    <td><?php wc_cart_totals_taxes_total_html(); ?></td>
    </tr>
    <?php endif; ?>
    <?php endif; ?>
    

    Thank you

    Don’t know it it makes a difference, but we have a similar setup and are based in Ontario. We have ‘Default Customer Location’ set to Geolocate in Woocommerce/Settings/General

    We also have Shipping Tax Class set to ‘shipping tax class based on cart items’ in
    Woocommerce/Settings/Tax

    Have you created any Shipping Zones in
    Woocommerce/Settings/Shipping ?

    Thread Starter nickroch

    (@nickroch)

    Hi albertandbrown.

    I originally had it set to geolocate but i thought that may be spoofing my website since my IP address is in BC… I can try setting it back and retest.

    I will also try setting the shipping tax class to based on cart items. I dont have any tax classes assigned to any of my products so I dont think it make a difference but we’ll see.

    Also, yes i have many shipping zones, mostly for local couriers in BC based on a collection of postal codes. i spent a LOT of time setting them up so i would really prefer not to delete them to test if that affects things, is there a way i can temporarily deactivate them?

    That would be inside WC Functions which is inside the Includes folder. As long as your theme doesn’t have any custom snippet it would be working. I’m on my laptop now. Going to review again.

    No idea if you can suspend the shipping zones, but you could do a backup, delete and test again. Then restore when ready to move on.

    I had time to review on my laptop and I noticed you have EXCLUDING on cart. Please switch that to INCLUDE during CART and CHECKOUT and to display either as a single or whatever you prefer.

    Thread Starter nickroch

    (@nickroch)

    Hi Stef,

    I made the change. Taxes are now rolled into the unit cost for the items and the shipping however it is still charging only the BC tax rate.

    in my testing i have a user set up as having an Ontario address which should have a HST rate of 15%. it is showing a GST rate of 5% and a PST rate of 7% aka BC tax rate…

    https://www.petrampvc.ca/wp-content/uploads/2019/05/pst-issue-5.png

    Thanks

    Wow. Somethings off there. You need to check the drop down in each product under General and make sure it’s only on Taxable not Shipping and not None.

    Take another screenshot please of your settings page in Taxes not Standard though.

    I need to go walk the dog and the wife’s got dinner ready so if that doesn’t help I’ll be back but maybe someone else can chime in.

    Thread Starter nickroch

    (@nickroch)

    @stef

    Okie, so I looked at a handful of my products and confirmed they are all taxable and not on shipping or none. almost all my SKUs were created using a csv import so i’m pretty confident they are all the same, tax treatment wise.

    Here the is requested screenshot: https://www.petrampvc.ca/wp-content/uploads/2019/05/pst-issue-6.png

    I have tried toggling various options back and forth to see if it effects a change. the only thing that I have done that makes any difference is changing the province of my store, then woocommerce pulls the correct tax for that store. its as if its somehow stuck on “calculate tax based on base store”

    I also tried enabling auto tax calculation with jetpack and woocommerce services and it does the same thing! only pulls up BC tax, regardless of what the shipping address is.

    somewhere, something is causing the tax to use store province for tax, besides the obvious setting in the woocommerce tax settings page.

    Any further ideas are greatly appreciated. If i am unable to solve with your advise, im not really sure what my next step would be…

    Ok. I think I have it figured out. In the postal code for all your different provinces you have them empty. Since yoo have them empty it’s going to go off of your home base.

    You’ll have to add various zip codes separating them by using a ;

    Also, if it’s not inckuded on the shipping uncheck that. I don’t know too many businesses that add tax to the shipping.

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘Woocommerce Tax calculation not working’ is closed to new replies.