Create your custom tax implementation if you need to comply with complex tax rules.
WP Full Stripe supports charging tax on top of subscription payments since v3.12.0 .
You can use the following tax calculation strategies:
When selecting “Custom rate”, you have to provide your own calculator implementation for the tax rate to be used.
You can implement a tax rate calculator as a Wordpress filter. The implementation can take into consideration form data like billing address, custom fields, etc.
Setting up a custom tax rate filter is comprises the following steps:
Your custom tax rate filter must conform to the following function signature:
Please note that you have to add your filter in WordPress, otherwise it will not be called:
The following example takes into account the supplier’s and the buyer’s country to determine the tax rate for e-goods. We are emphasizing e-goods because tax rules are different for e-goods and physical goods in the European Union.
The example calculates the tax rate based on the following table:
The implementation uses two custom fields for company name and EU VAT ID. It considers the entered data as a business if either the company name or the VAT ID is filled in. The code can be refined by adding real-time verification for EU VAT IDs.
Here is how the two custom fields are set up on the subscription form:
Here is the example EU VAT filter code:
This custom tax filter example is provided as is, only for the purpose of demonstrating the possibilities of custom tax filters that can be written for WP Full Stripe. You are granted the permission to use it, modify it, and redistribute it as you wish. Neither Mammothology nor Infinea Consulting Ltd can be held accountable for any inconsistencies, omissions, or bugs in the example code.
Our support team is happy to help you.
Contact support
Feature requests are always welcome!
We consider each feature request carefully, and examine how it fits the roadmap for the plugin.