| 开发者 | jeangalea |
|---|---|
| 更新时间 | 2026年11月2日 07:02 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
wp vat-right-for-edd import-barn2. Settings are copied on the server and never shown on screen or in logs. Barn2's VATSense key isn't copied, because this plugin checks GB numbers with HMRC instead.
While Barn2's plugin is active, this plugin only offers the import and doesn't touch checkout or orders. Deactivate Barn2's plugin once the import is done.
Checkout still works. By default the order is accepted, VAT is charged and the order is flagged as pending validation. The plugin checks the number again later and, if it validates, marks the order and can email you so you can refund the VAT. The setting "When a registry is unavailable" offers two alternatives: accept the order, exempt the VAT and re-check later, or don't accept the order. Registry requests time out after a few seconds. When VIES turns your store away for sending too many requests, or the plugin's own hourly lookup limit is reached, VAT is charged whatever that setting says, because visitors can cause either. Exempting while a registry is down lets anyone enter a made-up number for that country, so the VAT is yours to recover if the re-check fails.
Only when the setting "Refund the VAT automatically when a number validates after the order" is on (it's off by default), and only for an order that was charged VAT because the registry was down at checkout, when the registry then confirms the number is valid and the order would be reverse-charged with it. The plugin then creates a partial refund in EDD for exactly the VAT charged, once. The order's own totals stay as they were and the refund shows in EDD like one you made yourself, in the decision log and in the VAT reports, in the period of the refund. It does not refund when the order was already refunded in part, when the tax on the order doesn't match the VAT decision, when EDD won't refund the order (its status or refund window), or when the order was paid through a gateway other than EDD's Store Gateway. Those orders are flagged and get an order note, and you get the usual email, so you can decide. EDD's refund only records the refund unless it's issued from its refund form, so for payment providers the plugin doesn't refund through, the money has to be returned by you. A developer can add a gateway with the vatright_edd_auto_refund_gateways filter once refunds on it move money without the form.
HMRC only answers requests that carry credentials from a registered application, so you need your own. They're free.
Yes. At signup the cart's VAT treatment carries over to the subscription, including the reduced rate for downloads in a reduced category. A renewal is decided as a new sale: a recent registry answer is reused, otherwise the number is checked again. The plugin never changes what the gateway charges. It records the renewal at the amount charged, with the VAT the decision calls for inside that amount. If the treatment has changed since signup (the rate moved, you crossed the threshold, or the customer's number stopped being valid), the renewal is flagged on the order so you can update the subscription yourself. This has been tested with EDD Recurring 2.14.
From a country header your CDN adds to each request: CF-IPCountry from Cloudflare or CloudFront-Viewer-Country from Amazon CloudFront. Pick yours under "IP country source". Only pick a CDN your site is really behind, because without one a visitor could send the header themselves. With no source set, the plugin decides on the billing country and, when that conflicts with other evidence, the customer's self-certification. Developers can supply the country from elsewhere through the vatright_edd_ip_country filter. The plugin doesn't call any IP lookup service.
It stores the customer's VAT number, the registry's name, address and consultation number for it, and the IP country evidence used for the decision, on the order, in the plugin's ledger table and, for logged-in customers, in their customer record. After the retention period (10 years by default, counted from the end of the year of the sale, which matches the OSS record-keeping period) the plugin removes the personal data from the decision record and ledger rows and keeps the scheme, rule, amounts and country evidence. The same applies to the VAT fields Barn2's plugin left on imported orders. Exporters and erasers are registered with the WordPress privacy tools. All plugin data is kept when you delete the plugin, unless you tick "Delete all plugin data when the plugin is deleted".
See "External services" below. Nothing else is contacted, and the plugin makes no request unless a VAT number, a rate update or a currency conversion needs it.
The plugin is built for stores established in the EU. The setup check warns when your shop country is outside it. The points below each err on the side of charging VAT.