WooCommerce Tax Amount Issue
- Status: Pending
- Præmier: $20
- Modtagne indlæg: 1
I am having an issue with tax amounts and looking for help with a solution. Here is the problem:
1. Standard tax rates are setup within Woocommerce... GST at 5%.
2. My test product has a price of $100.00. When I click "add to cart", it shows subtotal of $100.00 and GST of $5.00 (5% of $100.00).
3. In reality, I have a complex and custom tax calculation ... and let's say after my calculation the GST should be $1.50.
The problem is coming from how to I pass off my GST calculation to WooCommerce and replace what it is calculating.
It seems that WC_Cart has protected arrays/objects of
[line_tax_data] => Array (
[subtotal] => Array (
 => 5.00
[total] => Array (
 => 5.00
I need a function to replace the => 5.00 with 1.50 as per my own calculation.
NOTE: This is a simple example. Please do not suggest adjusting the TAX RATES. I need to replace the TAX AMOUNTS calculated by WooCommerce.
Once I pass off my calculation to WooCommerce, then WooCommerce can continue to handle the data to store and view order information.
Thanks and looking forward to seeing your solutions!
Bedste indlæg fra denne konkurrence