Linux 软件免费装

VAT Right for Easy Digital Downloads

开发者 jeangalea
更新时间 2026年11月2日 07:02
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv3 or later
版权网址: 版权信息

标签

easy digital downloads vat eu vat reverse charge oss

下载

0.1.6

详情介绍:

Every order gets a VAT decision and a record of why: the customer's VAT number, the registry's answer, the location evidence and the rule that applied. If a tax office asks how an order was taxed, the answer is on the order. When VIES is down, checkout keeps working. By default VAT is charged, the order is flagged and the number is checked again later, so an outage is never recorded as an invalid number. When a customer's billing country and IP country disagree, the customer confirms their country instead of the plugin picking one. The plugin applies each decision through EDD's own tax calculation. It's free, has no Pro version and shows no branding in your store. Stores moving from Barn2's EDD EU VAT can bring their settings and order history across in one import. Settings live under Downloads > Settings > Taxes > EU VAT. The rates screen is under Downloads > EU VAT and the reports under Downloads > EU VAT reports. It needs Easy Digital Downloads 3.1 or later with taxes turned on. What it does Moving from Barn2's EDD EU VAT Downloads > Import from Barn2, which appears while Barn2's plugin is active or its settings are still in the database, copies Barn2's settings across and imports your order history into the OSS and EC Sales List reports, so the threshold and past quarters are right from the first day. Run the dry run first: it counts what would be imported per quarter and scheme and writes nothing. The same import runs from WP-CLI with 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.

安装:

  1. Make sure Easy Digital Downloads is active, then install and activate VAT Right for Easy Digital Downloads.
  2. Go to Downloads > Settings > Taxes and turn on taxes. EDD only shows the billing address fields, which the plugin needs, when taxes are on.
  3. Go to Downloads > Settings > Taxes > EU VAT and read the setup check.
  4. Enter your store VAT number so VIES can return a consultation number for each check.
  5. Apply the EU rates under Downloads > EU VAT.
  6. If you used Barn2's EDD EU VAT, run the import under Downloads > Import from Barn2.

屏幕截图:

  • Shortcode checkout with a VAT number the registry says isn't valid.
  • The EU VAT section under Downloads > Settings > Taxes, with the setup check.
  • The EU VAT section on an order, with the decision, a re-check and the decision log.
  • The EU VAT reports: OSS return and EC Sales List.

常见问题:

What happens when VIES is down?

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.

When does the plugin refund VAT automatically?

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.

How do I validate UK VAT numbers?

HMRC only answers requests that carry credentials from a registered application, so you need your own. They're free.

  1. Create an account at the HMRC Developer Hub.
  2. Register an application and subscribe it to the VAT Registered Companies API (check a UK VAT number).
  3. Copy the client ID and client secret from the application.
  4. Paste them into Downloads > Settings > Taxes > EU VAT.
Without credentials, GB numbers are only format-checked and a business customer in the UK is treated as a consumer.

Does it work with EDD Recurring?

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.

Where does the IP country come from?

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.

What personal data does the plugin store, and for how long?

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".

Which services does the plugin call?

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.

Are there known limitations?

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.

  • Consulting, legal, advertising and similar services to consumers outside the EU (Article 59 of the VAT Directive) are charged your store's VAT.
  • Business customers in the UK are treated as consumers unless you add your own HMRC API credentials. Swiss and Norwegian numbers that can't be checked at checkout are charged VAT until they're re-checked.
  • In a cart that's partly exempt because of a domestic exemption, the exempt line is charged VAT.
  • Wallet payments and Buy Now buttons skip EDD's checkout checks, so a customer there can't be asked to confirm their country. The plugin decides from the order's address and the IP country, and flags any conflict on the order.
  • A valid VAT number removes VAT without checking that the buyer is that company, so a published number belonging to someone else would pass.
  • The EDD Invoices and EDD PDF Invoices integrations have been tested against stand-ins that fire those add-ons' hooks, not against the add-ons themselves.

更新日志:

0.1.6 0.1.5 0.1.4 0.1.3 0.1.2 0.1.1 0.1.0