Different shipping taxes on checkout page and after order is placed #57161
Closed
AlexandruN
started this conversation in
Checkout Flow
Replies: 1 comment
-
I think this is a bug and I've added a reply here for the associated bug report: #56931 (comment) Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am not sure that I understand how taxes work for a WC_Shipping_Method and some help would be greatly appreciated.
On checkout page
By default, a shipping method has
public $tax_status = ProductTaxStatus::TAXABLE;
, and when add_rate is called, the following code is ran:So the method is_taxable looks at $tax_status:
With the above code, on the checkout page, the method is shown with taxes, based on the tax_status variable.
When placing the order
Then, after an order is placed, the following method is called to determine if taxes should be applied or not:
which looks at the option "tax_status" on the shipping method, and if this is not set, then the order has 0 tax for the shipping method.
So to summarize, the checkout checks the variable
$tax_status
on the shipping method, but after placing an order, theget_option('tax_status')
is checked. This can have different values so on the checkout page a shipping value can be shown, and after the order is placed, a different value is shown without tax.Is this intended behavior and why are there 2 ways for setting the tax_status?
Best regards,
Alex
Beta Was this translation helpful? Give feedback.
All reactions