ZATCA E-Invoice for WooCommerce

By Adil Elsaeed

★ 5.0/5 (1 ratings)10+ active installationsVersion 2.6.1

Arabic ZATCA simplified tax invoices for WooCommerce: PDF invoices with the Phase 1 QR code, in emails and My Account.

Description

ZATCA E-Invoice for WooCommerce helps businesses in Saudi Arabia issue simplified tax invoices that meet the ZATCA (Zakat, Tax and Customs Authority) Phase 1 (Generation) e-invoicing requirements: an Arabic PDF invoice with all the mandatory fields and the QR code, for every WooCommerce order.

Check ZATCA Mandatory Fields

Disclaimer: This plugin is not officially affiliated with or endorsed by ZATCA (Zakat, Tax and Customs Authority).

Features

  • PDF simplified tax invoices: an Arabic, right-to-left PDF invoice for each order, with the mandatory fields: invoice number and date, seller name, address and VAT number, lines with their VAT, and the totals (taxable amount, VAT, total).
  • ZATCA QR code: Base64 TLV data (seller name, VAT number, time stamp, invoice total, VAT total), generated on your server with no external service.
  • Automatic: the invoice is generated when the order reaches the statuses you choose (Completed by default), attached to the “Completed order” email, and downloadable from My Account and from the order page.
  • QR code everywhere: in order emails, on the order page in My Account, with the [zeiw_order_qr] shortcode, and in the WooCommerce REST API (qr_fatora_code).
  • Arabic first: on a site in another language, every label shows in Arabic and in that language (for example “الكمية / Quantity”), since invoices in Saudi Arabia must be in Arabic.
  • VAT check: warns when WooCommerce taxes are off or there is no 15% rate for Saudi Arabia, the reason invoices would show VAT as 0.00.
  • Simple settings page, built with the same components as WooCommerce. Values are checked before saving, and the VAT number accepts Arabic digits (٠-٩).
  • Private PDFs: invoices are stored in protected folders, and only the shop manager and the order’s customer can download them.
  • HPOS (High Performance Order Storage) compatible.
  • Works with our ZATCA Phase 2 plugin, which adds the reported e-invoice’s QR code and data to the same PDF.

Premium Version

Everything in the free version, plus:

  • Selling to businesses (B2B): the buyer’s name, company, billing address and VAT number on the invoice, and standard tax invoices for VAT-registered buyers, while individuals keep simplified invoices. A VAT number field at checkout (classic and block checkout), editable on the order page. Off by default: turn it on only if you sell to businesses.
  • Credit notes: a PDF credit note for each refund, attached to the “Refunded order” email.
  • Bulk generation: invoices and credit notes for past orders, in one click.
  • Branding: your logo, phone, email, website, detailed address and social media accounts (Instagram, X, Snapchat, TikTok, WhatsApp and more) on the invoice, with a custom header and footer.
  • Invoice design: main color, font size, logo and QR code position, product SKU, customer order note, and your own wording for the invoice labels.
  • Integrations: the QR code in WooCommerce PDF Invoices & Packing Slips, Print Invoice & Delivery Notes, WebToffee PDF Invoices and YeePDF.
  • QR code size, automatic updates and priority support.

Upgrade to Premium Version

Electronic Invoice Phase Two (Integration Phase)

This plugin is designed for Phase One (Generation).
If you need full compliance with Phase Two (Integration) requirements, which involve XML generation, cryptographic stamping, and direct integration with ZATCA servers, you need our specialized plugin:

Phase Two Plugin Features:
* Full integration with ZATCA portals (Fatoora & Simulation).
* Generation of XML files compliant with UBL 2.1 standards.
* Cryptographic Stamp & CSR Generation.
* Reporting of invoices.
* PIH (Previous Invoice Hash) chaining.

Get ZATCA Phase Two Plugin

Source Code

The settings page is a React app. Its source code is included in the plugin, in the src/ folder, and is built to the build/ folder with @wordpress/scripts: run npm ci, then npm run build.

Installation

  1. Upload the plugin files to the /wp-content/plugins/zatca-e-invoice-for-woocommerce directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Open the Zatca QR Fatora menu in the WordPress admin (الفوترة الإلكترونية in Arabic).
  4. On the Business page, enter your company name and VAT number (15 digits).
  5. On the Documents page, turn on the QR code and PDF invoices, and choose the order statuses.
  6. Make sure WooCommerce taxes are on, with a 15% standard rate for Saudi Arabia (SA).

FAQ

Does this plugin support ZATCA Phase Two?

No, this plugin supports the First Phase (Generation Phase) requirements only (PDF generation + QR Code).
For Phase Two (Integration Phase) which requires XML generation and API integration with ZATCA, you need to purchase our specialized plugin:
ZATCA Phase Two Integration Plugin

What is ZATCA?

ZATCA (formerly known as GAZT) is the Zakat, Tax and Customs Authority in Saudi Arabia. This plugin helps you generate invoices that comply with ZATCA requirements for electronic invoicing.

Why does the invoice show VAT as 0.00?

The plugin prints the VAT WooCommerce recorded on the order. If taxes are off in WooCommerce, or there is no rate for Saudi Arabia, the order has no VAT. Go to WooCommerce > Settings > General and tick “Enable tax rates and calculations”, set “Prices entered with tax” to match how you enter your prices, then add a 15% standard rate for the country code SA. New orders will show the VAT; the settings page warns you while this is missing.

Can I issue invoices to businesses with their VAT number?

Yes, in the premium version: turn on “Sell to businesses (B2B)”. Orders with a valid buyer VAT number get a standard tax invoice with the buyer’s details, and the others keep simplified tax invoices.

What is the difference between free and premium versions?

The free version issues simplified tax invoices: the PDF invoice with all the mandatory fields and the QR code, in emails, My Account, the order page, the shortcode and the REST API.

The premium version adds invoices for businesses (buyer details and standard tax invoices), credit notes, bulk generation, your logo, contact details and social media accounts, the invoice design and wording, integrations with other PDF invoice plugins, the QR code size, automatic updates and priority support.

Do I need WooCommerce?

Yes, this plugin requires WooCommerce to be installed and activated.

What PHP version is required?

PHP 7.4 or higher is required.

How do I generate QR codes?

  1. Open the Zatca QR Fatora menu (الفوترة الإلكترونية in Arabic)
  2. On the Business page, enter your company name and VAT number
  3. On the Documents page, turn on the QR code
  4. Select the order statuses where the QR code should appear
  5. Save

The QR code appears on orders in those statuses.

Screenshots

Changelog

2.6.1

  • Fixed (premium): a social media username with a dot (for example “alnukhba.store” on Instagram) was read as a website and shown without “@”. It now shows as “Instagram: @alnukhba.store”.

2.6.0

  • New: the settings page warns when WooCommerce taxes are off or there is no 15% VAT rate for Saudi Arabia, the reason invoices show VAT as 0.00.
  • New (premium): selling to businesses (B2B), off by default. The buyer’s name, company, billing address and VAT number on the invoice, and standard tax invoices (“Tax Invoice”) for VAT-registered buyers, with the VAT rate of each line. A VAT number field at checkout (classic and block checkout; optional, or required with a company name), an editable VAT number on the order page, or the VAT number read from another plugin. The invoice type can be changed per order, and the invoice regenerated. Standard invoices are not issued while the ZATCA Phase 2 plugin is active.
  • New (premium): social media accounts on the invoice, one row per platform (Instagram, X, Snapchat, TikTok, WhatsApp, and more), shown as “Instagram: @yourstore”. Links saved one per line by earlier versions are converted.
  • Improved: the plugin description lists the current free and premium features.

2.5.0

  • New: a simpler settings page, built with the same components as WooCommerce. Pages: Business, Documents, and Help (plus Design, Integrations and Tools in the premium version). Fields show only when the feature they belong to is on, and a save bar warns about changes that are not saved.
  • New: settings are checked before they are saved. A wrong value (for example a VAT number that is not 15 digits) is shown under its field and nothing is saved, instead of saving it anyway.
  • New: the VAT number field accepts Arabic digits (٠-٩).
  • Improved: the free version shows one card with the premium features instead of a notice beside each premium field.
  • Improved: Arabic translation of the settings page and of the credit note labels.
  • Fixed (premium): the logo on the PDF invoice and credit note was cropped to a square, and a transparent logo had a black background. It is now shown whole, on white.
  • Changed: requires WordPress 6.5 or later.

2.4.3

  • Improved: when the site language is not Arabic, the PDF invoice and credit note show every label in Arabic and in the site language (for example “الكمية / Quantity”), since invoices in Saudi Arabia must be in Arabic. Arabic sites are unchanged.
  • Fixed: saving the settings while the premium license was inactive (expired, or not synced yet) reset the premium settings (logo, header and footer, labels, appearance). They are now kept, and apply again once the license is active.

2.4.2

  • Fixed: the PDF invoice now lists shipping and fees as lines, and line amounts are after coupon discounts. “Total Taxable Amount” is the order total minus VAT, so the lines, the totals and the QR code always agree.
  • Fixed: QR code amounts always have two decimals (for example 15.00), as ZATCA expects.
  • Fixed (premium): the credit note QR code carried the original invoice’s date and amounts. It now carries the refund’s.
  • Fixed (premium): a credit note for a refund of an amount only (no products) listed all the order’s products. It now shows one line with the refunded amount.
  • Fixed (premium): “Bulk Generation” in the Tools tab always failed. Generating invoices and credit notes for earlier orders and refunds works now.
  • Changed: premium-only code (credit notes, bulk generation, license checks) is no longer included in the free version.

2.4.1

  • The license files of the bundled libraries (mPDF, FPDI, psr/log, php-qrcode and others) are included again. The 2.3.2-2.4.0 builds left them out.

2.4.0

  • New (premium): PDF invoice appearance options in the PDF Invoice tab: primary color, font size (9-12 pt), logo and QR code alignment, the product SKU under each product, and the customer’s order note. The fields required by ZATCA and the QR code are always shown.
  • Improved: Arabic text in the PDF invoice now uses the Tajawal font (SIL Open Font License, bundled in assets/fonts/tajawal). The invoice already asked for it, but the font was missing, so mPDF fell back to DejaVu Sans.

2.3.3

  • Fixed (premium): the “QR Code Size” setting was saved but never used, so the QR code was always 150 pixels. It now applies to the QR code on the order page, in order emails, in the [zeiw_order_qr] shortcode and in the supported PDF invoice plugins. The plugin’s own PDF invoice keeps its 150 pixel layout.
  • Fixed: the width attribute of the [zeiw_order_qr] shortcode is now honored. Without it, the size from the settings is used.
  • Fixed: the installation steps in the readme pointed to a Settings menu that does not exist. The plugin has its own “Zatca QR Fatora” menu.
  • Fixed Arabic translations: “Customer Access”, the PDF invoice section description, the license key description, and a few spelling mistakes.

2.3.2

  • Fixed: the bundled libraries required PHP 8.1, so on PHP 7.4 and 8.0 the plugin stopped the site with “Composer detected issues in your platform”, although PHP 7.4 is supported. They are now built for PHP 7.4.
  • Improved: the bundled libraries (mPDF, FPDI, psr/log, php-qrcode) now use the plugin’s own ZEIW\Vendor namespace, so another plugin shipping a different version of them can no longer break the PDF invoices or QR codes.
  • Updated mPDF to 8.3.1 and FPDI to 2.6.8.

2.3.1

  • Security: PDF invoices and credit notes contain customer data but were saved at predictable public paths (uploads/zatca/pdf-invoices/invoice-{order}.pdf). The .htaccess rule only protects them on Apache, so on Nginx anyone could download them by guessing the order number. Each PDF is now stored in its own folder named from a site secret, so its address cannot be guessed on any server. Downloads keep going through the permission checked links.
  • Security: existing PDFs are moved to the protected folders automatically after the update, unchanged, in batches of 200 per request.
  • Fixed: the .htaccess rules now also work on Apache 2.4 without mod_access_compat, and index.php files prevent directory listings.
  • ZEIW_Pdf_Invoice_Generator::get_invoice_file_url() now returns the permission checked download link instead of the file’s public address.

2.3.0

  • New: optional integration hooks for ZATCA Phase 2 plugins. When such a plugin is active, the QR code, invoice/credit note number, issue date and embedded XML can come from the invoice it reported to ZATCA. Nothing changes when no Phase 2 plugin is installed.
  • New: zeiw_document_data filter for the invoice/credit note data before the PDF is rendered.
  • New: zeiw_qr_data receives the refund when the QR code is for a credit note; zeiw_pdf_invoice_xml_filepath also applies to credit notes and receives the refund.
  • New: a cached PDF is regenerated when a Phase 2 plugin fires zatca_wc_document_changed.
  • New: zeiw_document_available filter. A Phase 2 plugin can hold back the QR code, PDF, downloads and email attachments of an order until it has issued the e-invoice, so customers never receive a document that differs from the one reported to ZATCA. Always available when no Phase 2 plugin is installed.

2.2.0

  • Fixed: Invoice PDF and QR code timestamps now consistently use the site’s configured timezone instead of mixing UTC and local time.
  • Fixed: VAT percentage on invoices now uses the order’s actual tax rate when available, avoiding rounding artifacts (e.g. 14.94% instead of 15%) on small-value orders.

2.0.1 (2026-06-09)

  • Fixed a fatal error that occurred in the free version due to missing license manager files.

2.0.0 (2026-05-20)

  • Major licensing update: Transitioned to Freemius for a better user experience and easier premium feature management.
  • Enhanced settings page.
  • Important: Existing premium users will be seamlessly migrated to the new licensing system.

1.0.1 (2025-12-27)

  • Fixed WordPress plugin repository compatibility issue
  • Fixed QR code image in account orders page

1.0.0 (2025-12-01)

  • Initial release
  • QR code generation for ZATCA compliance
  • PDF invoice generation
  • Email and My Account integration
  • HPOS compatibility