• Resolved bukaznik78

    (@bukaznik78)


    Hello! I am using weight base shipping together with the per product shipping plugin. It seems like per product shipping doesn’t add tax when used with wbs.

    1. WordPress: 4.9.8, WooCommerce: 3.4.5, Weight Based Shipping: 5.2.1, PHP: 7.0.30.

    2. https://drive.google.com/drive/folders/1xToawZgT0mKQFd8OTTnKAqwwbm4Hj2iY?usp=sharing

    3. I’m testing it with the order:
    Item #1: http://woo-dev.i-kiu.at/detail/test/, weight 0.6 kg, quantity 1

    Total order weight: 0.6
    Order subtotal: 12,00€
    Shipping destination: AT (Austria)

    4. I expect to see
    — “Verpackung & Versand” (= weight based shipping incl. per product shipping costs): 20,28€ incl. 3,38€ tax

    5. I do see instead:
    — “Verpackung & Versand” (= weight based shipping incl. per product shipping costs): 18,28€ incl. 1,38€ tax, missing 2€ tax from per product shipping costs.

    Here are more details:

    1. Test product “Test” (http://woo-dev.i-kiu.at/detail/test/) has a price of 12€ (incl. 20% tax) + per product shipping cost (line) of 10€ (excl. 20% tax). Weight based shipping (for country AT) is 6,9€ (excl. 20% tax) for 1 Test-product.

    Total price for 1 product including shipping and including tax should be 32,28€ (10 + 2 + 10 + 2 + 6,9 + 1,38 = 32,28€), shipping costs should be 10 + 2 + 6,9 + 1,38 = 20,28€, tax included for 1 product should be 5,38€ (2 + 2 + 1,38)

    2. However, if you go to checkout and have a look at the “Verpackung & Versand” shipping option (which is the weight based shipping option) the total price is 30,28€, tax included 3,38€, missing 2€ tax from per product shipping cost.

    3. If you check the flat shipping costs option (“Versandkostenpauschale”) which is set to 10€ excl. 20% tax, everything is fine: total price is 36€ (10 + 2 + 10 + 2 + 10 + 2) and 6€ tax (=20%) is correctly included. Hence, there must be an issue with “Per product shipping” and weight based shipping.

    Please advise 🙂

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dan

    (@dangoodman)

    Hello,

    Thank you for the detailed issue description. Really appreciate it.

    Could you send me a copy of the Per-Product Shipping plugin so I can check what’s happening under the hood? You can do it via this contact form.

    Thread Starter bukaznik78

    (@bukaznik78)

    Hello!

    I just sent the plugin…
    Thanks for your help!

    Best,
    Thomas

    Plugin Author Dan

    (@dangoodman)

    Thank you. I’ll check it and update you in a couple of days.

    Plugin Author Dan

    (@dangoodman)

    Hello Thomas,

    I have checked code of the Per Product Shipping (PPS) plugin and found out the following.

    It appears that in order to add its own taxes PPS expects a host shipping method to be taxable. WBS doesn’t have the taxable/non-taxable option on the shipping method level, instead it has it for each shipping rule. PPS, obviously, knows nothing about shipping rules.

    Anyway, you can PPS think the global WBS shipping method is taxable with the following code snippet:

    <?php
    // Paste everything below this line to your theme's functions.php file.
    
    add_filter('default_option_woocommerce_wbs_0_settings', function($default, $option, $passed_default) {
    
        if (!class_exists('\Wbs\ShippingMethod')) {
            return $default;
        }
    
        $data = get_option((new \Wbs\ShippingMethod(0))->get_option_key(), null);
        if (is_array($data)) {
            $data['tax_status'] = 'taxable';
        }
        if ($data === null) {
            $data = $default;
        }
    
        return $data;
    }, 10, 3);
    
    Thread Starter bukaznik78

    (@bukaznik78)

    Hi Dan!

    Thanks for your help and for making this great plugin available 🙂 Works perfectly now!

    Regards,
    Thomas

    Thread Starter bukaznik78

    (@bukaznik78)

    Issue resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘“Per product shipping” does not add tax when used with “Weight based shipping”’ is closed to new replies.