Tax Calculation module
Learn about the Tax Calculation module.
The TaxCalculation
module handles calculating taxes on the Shop, Product, and Cart pages and shows the final tax. This module shows taxes based on the WooCommerce backend settings.
Specifications
This module handles the tax calculation for single product and shop products. It hides the tax class (Standard, Reduce Rate, and Zero Rate) settings in WooCommerce Tax Settings.
The tax calculation is handled via the Digital River platform.
Use the customer's shipping address for rendering tax rates for products on the Shop and Single Product page.
Hide the tax row from the Cart page to finalize the tax rate review on the Checkout page.
After all the details are on the Checkout page, click Review Order on the Drop-in UI.
Tax exclusive or inclusive from price depends on Admin tax settings. Use those settings to display the tax is inclusive or exclusive from the product price on the Single product page and Shop page.
Tax Calculation Methods
Tax Calculation class
This class is the module's entry point.
Tax Calculation Container class
This class acts as a Dependency Injection container for providing dependencies to classes in the OrderManagement
module.
Product class
This class relates to various products and adds a custom class to the product container and product price element.
Cart Tax Calculation class
This class handles calculating taxes on the Cart page, shows the final tax, and shows taxes based on the WooCommerce backend settings.
Traits\Tax Calculation Utility trait
The TaxCalculation
class uses Utility methods.
Endpoints\Product Price class
This class creates a new REST API Endpoint to fetch the product price.
Last updated