Issue with tax and free trial
-
Hello there,
First, thanks for your awesome plugin.
I have a big issue in production : I’ve realized that tax doesn’t work correctly when you set a free trial.
What I tried :
When I set a subscription at 1 euros per days with no free trial
-> I see in subscription table that I’m subscribed with 1 euro per month, I see correct VAT the first day and the others days.When I set a one day free trial, the first day i have a order at 0 euro, but I see in subscription table that I’m subscribed with 1.20 euros per month. When I look at the subscribption post meta, I see 1 euro in order_total and wps_recurring_total. I see 0.20 in _order_tax (it should be 0.17).
_prices_include_tax post_meta is set to yes
line_subtotal_tax and line_tax post_meta are set at 0
line_subtotal and line_total post_meta are set at 1
line_tax_data post_meta looks empty : a:2:{s:8:”subtotal”;a:1:{i:1;d:0;}s:5:”total”;a:1:{i:1;d:0;}}when free trial is not set, theses post metas are not the same
Woocommerce is correctly configured for tax and the option “price is set vat included” is checked. I have no issue with other types of products.
From what i understood in the code, at renewal, the plugin looks for the taxes in first order, but the first order is at 0 euro.
I’m kinda in a situation here because I’ve already have few subscription in production with a 7 days trials. My customers will be charged more than they should be in three days.
I’ve tried to change things with the wps_product_args_for_order filter and manage to pass the correct taxes in the array, but it didn’t change anything in the tax meta and it didn’t work correctly : at renewal, I had an order without tax and the order price was set at 0.83… No idea why.
Any help appreciated, thanks !
- The topic ‘Issue with tax and free trial’ is closed to new replies.