• Resolved Camilo

    (@camiloluna)


    Hi team,

    I found what looks like a bug in stripe-tax-for-woocommerce affecting checkout totals when the selected shipping method is non-taxable.

    Observed behavior:

    • WooCommerce checkout shows the shipping line correctly, for example:
      • Product: $50.00
      • Shipping: $10.00
    • But the returned order-review total is still $50.00 instead of $60.00
    • Stripe payment initialization also reflects the wrong amount
    • This only happens for a shipping rate set as non-taxable

    The source of the problem seems to be in Stripe/Tax_Calculation/class-cart-input.php, where Cart_Input::get_taxable_shipping_cost_amount() only includes shipping cost when the chosen shipping method has tax_status = taxable.

    The current logic:

    • selected rate is loaded from chosen_shipping_methods
    • plugin loads woocommerce_<method>_<instance>_settings
    • if tax_status !== taxable, it skips that shipping amount entirely

    That means non-taxable shipping is being excluded from the Stripe Tax cart input, so later in class-cart-controller.php, the set_total( $tax_calculation_result->amount_total ) method is called with a total that excludes shipping entirely, instead of including shipping as non-taxed.

    There appears to be a matching pattern in Stripe/Tax_Calculation/class-order-input.php as well.

    Expected behavior:

    • Non-taxable shipping should still be included in the cart/order total
    • It should simply not receive shipping tax

    Suggested fix direction:

    • Include chosen shipping cost in the Stripe Tax input regardless of whether the shipping method is taxable
    • Only mark shipping as taxable / assign a shipping tax code when the method is actually taxable
    • For non-taxable shipping, pass the amount through but omit taxability so tax remains zero

    Hope this helps get a quick fix since we’re having issues where our orders are coming in with $0 as the shipping cost and we’re having to assume those costs.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.