You are viewing the documentation for the WooCommerce plugin Toret iDoklad. The plugin connects your e-shop with the iDoklad invoicing system: it issues invoices, proforma invoices and credit notes from orders, adds links to them to e-mails and can synchronize stock and contacts.
You can purchase the plugin here.
- Minimum Requirements
- Plugin Installation
- Before You Start: Credentials and Number Series in iDoklad
- License Activation and Connection with iDoklad
- General Settings
- Proforma Invoice
- Regular Invoice
- Credit Note
- Payment Pairing
- E-mail and My Account
- Stock Synchronization
- Contact Synchronization
- Rates and Currencies
- Bank Accounts
- Tools
- Managing Documents in Orders
- Log and Server Cron
- FAQ and Troubleshooting
- For Developers
- Plugin testing
Minimum Requirements
- WordPress 6.9 or higher
- WooCommerce 11.0 or higher
- PHP 8.2 or higher
- an iDoklad account with a plan that allows API connection
The plugin is compatible with HPOS order storage.
Plugin Installation
After purchasing the plugin, you will receive a license key and a link to download the plugin ZIP file by e-mail.
- In the WordPress administration, go to Plugins → Add New → Upload Plugin.
- Select the downloaded ZIP file and click “Install Now”.
- Activate the plugin.
You can find the plugin settings in the Toret plugins → iDoklad menu.
Before You Start: Credentials and Number Series in iDoklad
Before connecting the plugin, prepare the API credentials and number series in your iDoklad account. The plugin loads number series, payment types, VAT rates, tags and bank accounts from iDoklad, so they must be set up in iDoklad first.
Attention! iDoklad is available in several plans. Make sure your plan allows API connection.
API Credentials
- In iDoklad, open “Settings” (Nastavení, the gear icon) → “Applications” (Aplikace), “API” tab.
- Click “Generate” (Generovat). A Client ID and Client Secret will be created.
- Copy both values; you will enter them in the plugin.

Number Series
- In iDoklad, open “Settings” → “Sales” (Prodej), “Numbering” (Číslování) tab.
- Create a number series for invoices (“New” (Nová) button). Explanations of the fields appear after clicking the question mark.
- Set up the series for proforma invoices and credit notes in the same way (further down the page).
- Save the changes.


You can have several series for invoices and credit notes; iDoklad uses the one marked as selected. In the plugin, you then select the series separately for proformas, invoices and credit notes (see below).
Document Appearance
You can set the look, text and language of invoices and proforma invoices in iDoklad under “Settings” → “Sales”, on the “Default Settings” (Výchozí nastavení) and “Document Appearance and Printing” (Vzhled a tisk dokladů) tabs.





License Activation and Connection with iDoklad
(Toret plugins → iDoklad → General Settings (Obecné nastavení))
License
Paste the key from the e-mail into the “License Key” (Licenční klíč) field and click “Activate” (Aktivovat). The license status is shown above the field.

API Settings and Localization
- “Client ID” and “Client secret” – the credentials generated in iDoklad.
- “Log API call details” (Zapisovat podrobnosti volání API do logu) – details of API requests are also written to the iDoklad log. Turn it on when troubleshooting; otherwise it is not needed.
- “Use CZ or SK API” (Použít CZ, nebo SK API) – select iDoklad.cz or iDoklad.sk depending on where your account is.

Save the settings. If the credentials are wrong, the plugin shows a message that the access token cannot be obtained. After you change the API credentials, the plugin connects to the new company automatically.
Once connected, the plugin shows a notice until the tax rates are assigned (Rates and Currencies) and a number series for invoices is selected (Regular Invoice). Both settings are required for issuing documents.
TIP: If you do not see number series or payment types from iDoklad in the drop-downs, save the settings and reload the page.
General Settings
(Toret plugins → iDoklad → General Settings)
Main Settings
- “E-mail for failure notification” (E-mail pro odeslání notifikace o selhání) – if automatic document issuing fails, an e-mail with the order number and a description of the error is sent to this address.
- “Do not create invoices for zero-value orders” (Nevytvářet fakturu pro nulové objednávky) – no document is issued automatically for orders with a total of 0 CZK.
- “Send invoices without tax” (Odesílat faktury bez daně) – items are sent to iDoklad with prices excluding tax and without VAT.
- “Enable reverse charge” (Povolit přenesenou daňovou povinnost) – orders exempt from VAT (e.g. to EU companies with a VAT ID verified by the Toret EU VAT plugin) are issued in reverse charge mode.
- “Use order ID as variable symbol” (Použít jako variabilní symbol ID objednávky) – the order number is used as the variable symbol of the document.
- “Enable OSS mode” (Povolit režim OSS) and “Country where OSS is registered” (Stát, ve kterém je OSS registrováno) – enables issuing documents in OSS (One Stop Shop) mode.

Attention! When OSS mode is enabled, do not use proforma invoices; issue regular invoices directly.
TIP: When to use OSS mode or reverse charge is explained on the website of the Financial Administration of the Czech Republic.
Document Format
- “Invoice language” (Jazyk faktury) – Czech, Slovak, English, German or Automatic. With Automatic, the language is determined by the customer’s billing country: Czech Republic – Czech, Slovakia – Slovak, Germany, Austria and Switzerland – German, other countries – English.
- “Text before items” (Text před položkami) and “Text after items” (Text za položkami) – custom text shown on the document before and after the list of items.
- “Add shipping address to document” (Přidat do dokladu doručovací adresu) – the shipping address is added to the document if the customer filled it in.
- “Variant name display on invoice” (Zobrazení názvu varianty na faktuře) – how a product variant is shown on the document: “Base product name only” (Pouze základní název produktu), the name with attribute values, or the name with attribute names and values.
- “Add item options to name” (Přidat volby položky do názvu) – options saved with the order item are appended to the item name, e.g. from the Advanced Product Fields, WooCommerce Product Add-Ons or YITH plugins.

EXAMPLE: A customer buys a T-shirt in blue, size XXL. The invoice can show “T-shirt”, “T-shirt Blue, XXL” or “T-shirt Color: Blue, Size: XXL”.

Note: iDoklad accepts item names of up to 200 characters; the plugin shortens longer names.
Units
“Product unit” (Jednotka produktu), “Shipping unit” (Jednotka dopravy) and “Fee unit” (Jednotka poplatku) – the unit shown with items on proforma invoices and invoices (e.g. m or kg). If you leave a field empty, “ks” (pcs) is used.


Company ID (IČ) and VAT ID (DIČ) Fields
WooCommerce has no fields for the company ID (IČ) and VAT ID (DIČ). If you add them to the checkout with another plugin, enter the names of the meta fields under which the values are stored with the order into the “IČ”, “DIČ” and “IČ DPH (SK)” fields. The plugin then passes them to the contact in iDoklad.

TIP: You can easily add company ID, VAT ID and Slovak VAT ID fields with the Toret EU VAT plugin. With it, you do not need to fill in the field names; the plugin links them automatically.
Tags
“Default tags” (Výchozí štítky) – tags from iDoklad that are assigned to issued documents. You can change them for a specific order in the iDoklad box in the order detail.

Proforma Invoice
(Toret plugins → iDoklad → Proforma Invoice (Proforma faktura))
Use a proforma invoice (zálohová faktura) for payments where the money does not reach your account immediately, e.g. bank transfer. Once it is paid, an invoice (tax document) is issued from it.
Proforma Settings
- “Hide button for creating proforma invoice” (Skrýt tlačítko pro vytvoření proforma faktury) – the button for creating a proforma manually is not shown.
- “Number series selection” (Výběr číselné řady) – the number series for proforma invoices from iDoklad.
- “Proforma invoice payment check” (Kontrola zaplacenosti proforma faktury):
- “Do not check – pay and issue invoice” (Nekontrolovat – uhradit a vystavit fakturu) – when the invoice is issued (manually or by an order status change), the proforma is marked as paid.
- “Check – do not issue invoice if not paid” (Kontrolovat – pokud není uhrazeno, nevystavovat fakturu) – the invoice is created only when the proforma is paid in iDoklad. If it is not paid, the plugin shows a notice. The plugin can detect the payment by itself, see Payment Pairing.

Proforma Creation by Order Status
For each payment method, select the order status in which the proforma is created automatically, or “Do not generate” (Negenerovat). The “No payment method” (Bez platební metody) row applies to orders without a payment method.

EXAMPLE: Direct bank transfer – On hold (Čeká na vyřízení). The proforma is created right after the order is placed and the customer receives it by e-mail.
Attention! Do not set the same status for both the proforma and the invoice for the same payment method. Two separate documents would be created that are not linked to each other.
Regular Invoice
(Toret plugins → iDoklad → Regular Invoice (Běžná faktura))
Invoice Settings
- “Hide button for creating invoice” (Skrýt tlačítko pro vytvoření faktury) – the button for creating an invoice manually is not shown.
- “Number series selection” – the number series for invoices from iDoklad. Without it, the plugin does not issue invoices.
- “Set due date by payment date” (Nastavit datum splatnosti dle data úhrady) – use it when the invoice is issued and marked as paid in the same order status.

Invoice Creation by Order Status
For each payment method, select the order status in which the invoice is issued automatically, or “Do not generate”. If a proforma already exists for the order, the invoice is issued from it.

Marking the Invoice as Paid (by Order Status)
For each payment method, select the status in which the invoice is marked as paid in iDoklad.

EXAMPLE: For cash on delivery, the invoice is issued in the Processing (Zpracovává se) status and enclosed with the parcel. It is paid only after the customer collects the parcel, so mark it as paid in the Completed (Dokončeno) status.
eFaktúra (SK)
This section is shown only when connected to iDoklad.sk.
“Issue invoices and credit notes as eFaktúra” (Vystavovat faktury a dobropisy jako eFaktúru) – invoices and credit notes for Slovak customers who are VAT payers are saved in iDoklad as eFaktúra.
- Applies only to customers with a Slovak VAT ID (IČ DPH) in the format SK + 10 digits. If the DIČ is missing, the plugin fills it in from the IČ DPH.
- Item units are sent as international codes (e.g. H87 instead of ks) and iDoklad shows them in this form in the PDF as well.
- For now, send the eFaktúra to the Peppol network manually in iDoklad. You can see the sending status in the iDoklad box in the order detail.
- For payment by bank transfer, the bank account in iDoklad must have an IBAN filled in.

After you enable it, the plugin checks that a digital postman with eFaktúra sending enabled is active in iDoklad, and warns you if the store in WooCommerce is set to a country other than Slovakia (WooCommerce → Settings → General).
TIP: You can find details about eFaktúra on the website of the Financial Administration of the Slovak Republic.
Credit Note
(Toret plugins → iDoklad → Credit Note (Dobropis))
- “Hide button for creating credit note” (Skrýt tlačítko pro vytvoření dobropisu) – the button for creating a credit note manually is not shown.
- “Number series selection” – the number series for credit notes from iDoklad.
- “Credit note creation by order status” (Vytvoření dobropisu dle stavu objednávky) – for each payment method, the status in which the credit note is issued automatically, or “Do not generate”.

A link to the credit note is added to the order e-mail and to the order detail in the My Account section.
Payment Pairing
(Toret plugins → iDoklad → Payment Pairing (Párování plateb))
If you have a bank account connected in iDoklad, iDoklad matches an incoming payment with the proforma or invoice by the variable symbol and marks it as paid. The plugin regularly loads this information and changes the order status. Issuing the invoice can follow the status change.
- Copy the “Cron URL for payment check” (URL CRONu pro kontrolu úhrad) (https://vasedomena.cz/wp-json/toret-idoklad/v1/payment-sync) and set it up in a cron job on your hosting. The recommended interval is once an hour. (a)
- “Order statuses for payment check” (Stavy objednávky pro kontrolu úhrady) – the plugin checks orders in these statuses. The defaults are Processing, On hold and Pending payment (Zpracovává se, Čeká na vyřízení a Čeká na platbu). (b)
- “New status after payment (proforma)” (Nový stav po úhradě (proforma)) – the status the order switches to after the proforma is paid. (c)
- “New status after payment (invoice)” (Nový stav po úhradě (faktura)) – the status the order switches to after the invoice is paid. (c)
- Save the settings.

Attention! Each check uses requests to the iDoklad API. A cron that runs too often and many checked statuses can exhaust the API limit, and documents will then not be issued.
EXAMPLE: Bank transfer with a proforma in the On hold status, “New status after payment (proforma)” – Processing, and the invoice set to the Processing status. After the payment is matched, the order switches and a paid invoice is issued.
E-mail and My Account
(Toret plugins → iDoklad → E-mail and My Account (E-mail a Můj účet))
Buttons and Actions
- “Show icon for sending invoice / proforma / credit note” (Zobrazit ikonu pro odeslání faktury / proformy / dobropisu) – a button for sending the document manually by e-mail from iDoklad is shown with the order. (a)
- “Automatically send invoice / proforma / credit note” (Automaticky odeslat fakturu / proformu / dobropis) – right after it is created, the document is sent by e-mail from iDoklad to the recipients set in the Recipients section. (b)
- “Add invoice link to e-mail” (Přidat odkaz na fakturu do emailu) – with “Yes” (Ano), a block with a link to download the invoice, proforma or credit note is added to WooCommerce order e-mails. (c)
- “Show download link on thank-you page” (Zobrazit odkaz na stažení na děkovné stránce) – the customer can download the document right after placing the order, if it has already been created. (d)

Recipients
Who iDoklad sends the e-mail with the document to (applies to automatic and manual sending):
- “Send to accountant” (Poslat účetní) – the accountant’s e-mail and template are set in iDoklad.
- “Send to customer” (Poslat zákazníkovi)
- “Send copy to company e-mail” (Poslat kopii na firemní e-mail)

Custom Text – Invoice and Custom Text – Proforma
The look of the block with the document link in WooCommerce e-mails (Vlastní text – Faktura, Vlastní text – Proforma). The content of e-mails sent from iDoklad is edited in iDoklad.
- “Heading” (Nadpis) – the default is “Faktura k objednávce”.
- “Text” – the default is “K dokončené objednávce si můžete stáhnout fakturu.”
- “Button text” (Text tlačítka) – the default is “Faktura ke stažení”.
- “CSS Heading” (CSS Nadpis) and “CSS Button” (CSS Tlačítko) – custom style of the heading and the button. If you leave them empty, the default style is used.

TIP: Custom texts are also a way to change the texts of the e-mail block without a translation plugin.
Stock Synchronization
(Toret plugins → iDoklad → Stock Synchronization (Synchronizace skladu))
The plugin can link WooCommerce products with stock items in iDoklad. After an order, the item is deducted from stock in iDoklad; optionally, stock is also transferred the other way. Synchronization applies only to products with “Manage stock” enabled in WooCommerce.
WooCommerce → iDoklad
- “Activate stock synchronization” (Aktivovat synchronizaci skladu) – enables the feature and adds the iDoklad sync stock page to the Toret plugins menu. If the page does not appear after saving, reload the administration.
- “Synchronization type” (Typ synchronizace):
- “Decrease/increase stock quantity on order and manual change in administration” (Snížení/zvýšení množství skladem při objednání i manuální úpravě v administraci) – stock in iDoklad is updated on an order, its cancellation and a manual stock change of the product.
- “Only decrease stock quantity on order” (Pouze snížení množství skladem při objednání) – stock in iDoklad is updated only by orders.

iDoklad → WooCommerce
- “Activate synchronization (starting the next day)” (Aktivovat synchronizaci (začátek následující den)) – enables the transfer of stock movements from iDoklad to WooCommerce. Movements are loaded from the next day on, so that the stock levels match.
- “Activate WP cron” (Aktivovat WP cron) and “WP cron interval” (Interval WP cronu) – synchronization runs via WP cron at an interval from 5 minutes to 1 day.
- “URL for custom cron” (URL pro vlastní cron) – instead of WP cron, you can set the address https://vasedomena.cz/wp-json/toret-idoklad/v1/stock-sync in a cron job on your hosting with your own interval.

Disable Stock Synchronization for Payment Method
For the checked payment methods, stock is not synchronized and items are not deducted from stock in iDoklad.

iDoklad Sync Stock Page
(Toret plugins → iDoklad sync stock)
A table of products with the columns Sku, Name (Název), iDoklad item ID (iDoklad id položky), iDoklad item name (iDoklad název položky), Actions (Akce) and Stock (Sklad).
- “Export item to iDoklad” (Exportovat položku do iDokladu) – creates a stock item in iDoklad. The SKU is used as the code; if it is empty, the product ID is used.
- “Delete item in iDoklad” (Odstranit položku v iDokladu) – deletes the exported item in iDoklad.
- “Export 500 items to iDoklad” (Exportovat 500 položek do iDokladu) and “Delete 500 items from iDoklad” (Odstranit 500 položek z iDokladu) – bulk actions below the table.
- “Import stock from iDoklad” (Importovat sklad z iDokladu) – loads the stock levels from iDoklad into WooCommerce, page by page for larger numbers of products.
- “Saved movements” (Uložené pohyby) – an overview of stock movements processed by the plugin. You can delete it with the “Delete local movements” (Odstranit lokální pohyby) button.

Pairing with Existing Items
If you already have items created in iDoklad:
- In iDoklad, open the item detail and copy the ID from the end of the address (after the last slash).
- Paste it into the “iDoklad item ID” field of the product and save.
- Click “Export item to iDoklad”. The item in iDoklad gets the stock, price and barcode from WooCommerce.


Attention! Delete exported items with the “Delete item in iDoklad” button on the iDoklad sync stock page, not in the iDoklad administration.
Contact Synchronization
(Toret plugins → iDoklad → Contact Synchronization (Synchronizace kontaktů))
The plugin can send customers to the iDoklad address book even without issuing a document. Before creating a contact, it looks it up in iDoklad by e-mail to avoid duplicates.
- “Activate contact synchronization” (Aktivovat synchronizaci kontaktů) – adds the iDoklad kontakty page and actions in the user list.
- “Create contact when an order is received (even without issuing a document)” (Vytvořit kontakt při přijetí objednávky (i bez vystavení dokladu))
- “Synchronize contact on customer registration and profile update” (Synchronizovat kontakt při registraci zákazníka a úpravě profilu)

Attention! Each synchronization uses 1–2 requests from the monthly iDoklad API limit according to your plan.
iDoklad Kontakty Page
(Toret plugins → iDoklad kontakty)
Bulk synchronization of existing customers. One click processes 25 customers; you start the next batch with the “Synchronize next 25 customers” (Synchronizovat dalších 25 zákazníků) button. For each customer, you see the result: Created (Vytvořen), Updated (Aktualizován), Unchanged (Beze změny), Skipped (Přeskočen) or Error (Chyba).


User List
In Users → All Users, an iDoklad column is added, along with the “Synchronize contact to iDoklad” (Synchronizovat kontakt do iDokladu) action for each user and the “Synchronize contacts to iDoklad” (Synchronizovat kontakty do iDokladu) bulk action.

Rates and Currencies
(Toret plugins → iDoklad → Rates and Currencies (Sazby a měny))
Assigning Payment Methods
For each active payment method of the e-shop, select a payment type from iDoklad. The payment type is shown on the document.

Assigning Tax Rates
iDoklad calculates the VAT of items itself based on the rate the plugin sends. For the “Standard rate” (Standartní sazba) and each WooCommerce tax class, select the iDoklad rate: “Basic rate” (Základní sazba), “Reduced rate” (Snížená sazba), “Zero rate” (Nulová sazba) or “Reduced rate 2” (Snížená sazba 2). Assign only the classes you actually use.
- “Fee tax rate” (Sazba daně příplatku (fee)) and “Shipping tax rate” (Sazba daně dopravy) – the default is “By product rate” (Podle sazby produktů).
- “Coupon tax rate” (Sazba daně kupónu) – the default is “Basic rate”.

Note: On a Czech iDoklad account, the plugin automatically sends “Reduced rate 2” as “Reduced rate”. On a Slovak account it stays unchanged.
Attention! In WooCommerce → Settings → General, set “Number of decimals” to at least 2. With zero, iDoklad calculates with rounded prices and the amount on the invoice may not match the order. You can hide the trailing zeros on the website with this code in your child theme:
add_filter( 'woocommerce_price_trim_zeros', '__return_true' );
VAT Classification
“Enable VAT classification” (Povolit členění daně) and “VAT classification” (Členění daně) – the selected VAT classification from iDoklad is set for the document items.

Currency Conversion
“Source for loading the current exchange rate” (Zdroj pro načtení aktuálního kurzu) – where the plugin takes the exchange rate for documents in a currency other than the iDoklad account currency:
- Česká Národní Banka (Czech National Bank) – EUR, USD, HUF and PLN rates (default for iDoklad.cz).
- Národná banka Slovenska (National Bank of Slovakia) – CZK, USD, HUF and PLN rates (default for iDoklad.sk).
- YayCurrency, WooCommerce Price Based on Country, CURCY – WooCommerce Multi Currency – the rate saved with the order by that plugin.

EXAMPLE: An e-shop with an iDoklad.cz account also sells in euros via CURCY. Select CURCY – WooCommerce Multi Currency and the invoice in euros gets the exchange rate the customer paid with.
Bank Accounts
(Toret plugins → iDoklad → Bank Accounts (Bankovní účty))
The document shows the payment details of the account in the document currency. “Where to take bank accounts from” (Odkud brát bankovní účty):
- “From iDoklad (recommended)” (Z iDokladu (doporučeno)) – the accounts are loaded from iDoklad and each invoice is assigned the matching account by currency. The setting is saved automatically, without the “Save” button.

- “Custom (enter manually)” (Vlastní (zadat ručně)) – for each account, fill in Currency (Měna), Account number (Číslo účtu), Bank code (Kód banky), IBAN and SWIFT. Add another account with the “Add account” (Přidat účet) button.

After changing the source, save the settings so that the relevant fields are shown.
Tools
(Toret plugins → iDoklad → Tools (Nástroje))
“Delete iDoklad ID of all users” (Smazat iDoklad ID všech uživatelů) – deletes the stored link to the iDoklad contact for WordPress users. Use it after changing the iDoklad account so that contacts are created in the new account.

Managing Documents in Orders
Order List
(WooCommerce → Orders)
- “Invoice ID” (ID faktury) column – the number of the invoice or proforma, or of the receipt. Click it to open the document.
- “iDoklad” column – buttons for creating an invoice or proforma, downloading the PDF, editing the document in iDoklad, creating a credit note and sending the document by e-mail (envelope icon, if enabled on the E-mail and My Account tab).
- “Send to iDoklad” (Odeslat do iDokladu) bulk action – issues invoices for the selected orders that do not have an invoice yet.

Order Detail
Depending on the order status, the iDoklad box contains the buttons “Create proforma” (Vytvořit proformu), “Create invoice” (Vytvořit fakturu), “Create credit note” (Vytvořit dobropis), “Download” (Stáhnout) and “Edit” (Upravit) for issued documents, and “Send invoice / proforma / credit note by e-mail” (Odeslat fakturu / proformu / dobropis emailem). You will also find there:
- the document tags for this order (the defaults are taken from the General Settings),
- the eFaktúra sending status (only on iDoklad.sk with eFaktúra enabled),
- the “Show log entries for this order” (Zobrazit záznamy logu pro tuto objednávku) link.

If issuing a document fails, the plugin shows the error from iDoklad as a notice in the administration and writes it to the log.
Customer
The customer finds the links to download the invoice, proforma and credit note in the order e-mail, in the order detail in the My Account section and, depending on the settings on the E-mail and My Account tab, on the thank-you page.

Log and Server Cron
iDoklad Log
(Toret plugins → iDoklad log)
The log contains entries for all orders: issued documents, API errors and other events. You can filter the entries, export them to CSV and delete them. Open the log of a single order from the iDoklad box in its detail.

TIP: When troubleshooting, enable “Log API call details” in the General Settings. The log then also shows the data sent to iDoklad.
Server Cron
Enter the addresses in a cron job on your hosting. Replace vasedomena.cz with your e-shop domain.
| Task | Address | Interval |
|---|---|---|
| Payment check (Payment Pairing) | https://vasedomena.cz/wp-json/toret-idoklad/v1/payment-sync | recommended once an hour |
| Stock synchronization from iDoklad | https://vasedomena.cz/wp-json/toret-idoklad/v1/stock-sync | as needed |
Attention! The control.php file from older versions is deprecated and will be removed. If you use it in your cron, replace it with the payment-sync address.
Plugin testing
For testing purposes, you can use:
- the subdomain “dev.domainlicense” (with the same license as for the production website)
- localhost (127.0.0.1)
Purchased plugins will also work in these locations, and you can test their implementation and compatibility here before deploying them to the website and during its use.
FAQ and Troubleshooting
Messages and Situations
| Message or situation | What to do |
|---|---|
| Není možné získat přístupový token, zkontrolujte prosím client ID a client secret. (The access token cannot be obtained, please check the client ID and client secret.) | Check the Client ID and Client secret and the iDoklad.cz / iDoklad.sk option in the General Settings. |
| Pro správné fungování je třeba nastavit přiřazení daňových sazeb k číselníku iDokladu. (For correct operation, the tax rates must be assigned to the iDoklad code list.) | Assign the rates on the Rates and Currencies tab. |
| Pro správné fungování je třeba nastavit vybrat číselnou řadu pro fakturu. (For correct operation, a number series for invoices must be selected.) | Select a number series on the Regular Invoice tab. |
| Faktura k objednávce nebyla vystavena — proforma zatím není v iDokladu označena jako uhrazená. (The invoice for the order was not issued — the proforma is not yet marked as paid in iDoklad.) | The proforma payment check is enabled. Wait until the payment is matched, or mark the proforma as paid in iDoklad. |
| Documents are not issued; the log shows an unknown error or an empty API response. | Most often, the iDoklad API limit has been exhausted. Reduce the frequency of the payment check cron and the number of checked order statuses. |
| Pro platbu převodem je povinný IBAN (eFaktúra). (IBAN is required for payment by bank transfer.) | Add an IBAN to the bank account in iDoklad. |
| V iDokladu není aktivní digitální pošťák s povoleným odesíláním eFaktúr. (There is no active digital postman with eFaktúra sending enabled in iDoklad.) | Set up the digital postman in iDoklad. |
| eFaktúra je dostupná jen pro firmu se slovenskou legislativou. (eFaktúra is available only for a company under Slovak legislation.) | Generate the API credentials in the Slovak company on iDoklad.sk. |
| Kontakt nebyl synchronizován — chybí e-mail nebo mapování země. (The contact was not synchronized — the e-mail or country mapping is missing.) | Check that the customer has an e-mail and a country filled in. |
| Both a proforma and an invoice were created for the order and they are not linked. | The payment method has the same status set for creating both the proforma and the invoice. Keep only one trigger. |
| The invoice link in the e-mail does not work. | If you send e-mails through a service with click tracking (e.g. SendGrid), the link is wrapped in a tracking address and the PDF downloads in the background. Turn off click tracking. |
| Amounts on the document are rounded incorrectly. | In WooCommerce → Settings → General, set “Number of decimals” to at least 2. |
How do I issue an invoice in another language?
In General Settings → Document Format, select the “Invoice language”. With Automatic, the language is determined by the customer’s country. For custom rules, use the toret_idoklad_invoice_lang filter (see For Developers).
How do I translate the plugin texts?
The plugin includes a translation template and a Slovak translation. You can translate the texts e.g. with the Loco Translate plugin. You can change the texts of the e-mail link block without translation on the E-mail and My Account tab.
I changed my iDoklad account. What next?
- Enter the new Client ID and Client secret and save.
- Select the number series, payment types and VAT rates again.
- On the Tools tab, click “Delete iDoklad ID of all users”.
Why was no invoice created for an order of 0 CZK?
The “Do not create invoices for zero-value orders” option is enabled in the General Settings.
For Developers
You can modify the behavior of the plugin with filters and actions, e.g. in the functions.php file of your child theme.
Filters: Issuing Documents
| Filter | Parameters | Purpose |
|---|---|---|
| idoklad_skip_to_send_invoice | $skip (false), $order_id | Returning true skips issuing the invoice. |
| idoklad_skip_to_send_proforma | $skip (false), $order_id | Returning true skips issuing the proforma. |
| idoklad_skip_to_send_creditnote | $send (true), $order_id | Returning false skips issuing the credit note. Attention: the logic is the opposite of the invoice and proforma filters. |
| idoklad_send_invoice_postpone, idoklad_send_proforma_postpone | $postpone (false), $order_id | Returning true postpones creating the document. |
| idoklad_create_invoice_on_status | $status, $payment_method, $type (proforma, regular, dobropis), $order_id | The order status in which the document is created. |
| idoklad_pay_invoice_on_status | $status, $payment_method, $order_id | The order status in which the invoice is marked as paid. |
| tidoklad_document_type_on_status_change | $type, $order_id, $source | The type of document created on a status change. |
| idoklad_issued_invoice_data, idoklad_issued_proforma_data, idoklad_credit_note_data | $data, $order_id | Document data before sending to iDoklad. |
| idoklad_invoice_sequence, idoklad_proforma_sequence, idoklad_creditnote_sequence | $sequence, $order | ID of the document number series. |
| idoklad_invoice_description, idoklad_proforma_description, idoklad_creditnote_description | $description, $order_id | Document description. |
| idoklad_order_number | $order_number | The order number sent to iDoklad (the default is the WooCommerce order number). |
| idoklad_variable_symbol | $variable_symbol | Variable symbol of the document. |
| idoklad_exchange_rate | $rate (false), $order_id, $currency_id | Exchange rate of the document currency. The plugin fills it according to the “Source for loading the current exchange rate” option. |
| idoklad_exchange_rate_amount | $amount (false), $order_id | The currency amount the rate refers to (1, 10, 100). |
| idoklad_is_einvoice | $is_einvoice, $order | Whether the document is issued as eFaktúra. |
Filters: Document Items and Texts
| Filter | Parameters | Purpose |
|---|---|---|
| toret_idoklad_product_item_line, toret_idoklad_shipping_item_line, toret_idoklad_fee_item_line, toret_idoklad_discount_item_line | $item, $order | Data of a single document item (product, shipping, fee, discount). |
| idoklad_order_item_name | $name, $product | Item name. |
| idoklad_order_item_meta_exclude_keys | $exclude, $item, $product | Meta keys that are not added to the name with the “Add item options to name” option. |
| toret_idoklad_unit_product, toret_idoklad_unit_shipping, toret_idoklad_unit_fee | $unit, $order | Item unit. |
| idoklad_einvoice_unit_code | $code, $unit | International unit code for eFaktúra. |
| toret_idoklad_text_before_items, toret_idoklad_text_after_items | $text, $type (invoice, proforma), $order_id | Text before and after the items. |
Filters: Language, PDF and E-mails
| Filter | Parameters | Purpose |
|---|---|---|
| toret_idoklad_invoice_lang | $language (1 Czech, 2 Slovak, 3 English, 4 German), $order_id | Document language. |
| idoklad_language_code_faktura | $lang (cs-CZ) | Language in which the document PDF is downloaded. |
| idoklad_request_language_code | $language (cs-CZ) | Language of requests to the iDoklad API. |
| idoklad_pdf_with_stvrzenka | $with_receipt (false) | Returning true downloads the PDF with the receipt. |
| idoklad_email_output, idoklad_email_proforma_output, idoklad_email_dobropis_output | $html, $pdf_link, $order | HTML of the block with the document link in the e-mail. |
| idoklad_thankyou_link_html | $html, $pdf_link, $order | HTML of the link on the thank-you page. |
EXAMPLE: Invoices for customers from Austria in English instead of German:
add_filter( 'toret_idoklad_invoice_lang', function ( $language, $order_id ) {
$order = wc_get_order( $order_id );
if ( $order && $order->get_billing_country() === 'AT' ) {
return 3;
}
return $language;
}, 10, 2 );
Filters: Payment Pairing, Stock and Contacts
| Filter | Parameters | Purpose |
|---|---|---|
| idoklad_control_proforma_status, idoklad_control_status | $status, $order | New order status after the proforma / invoice is paid. |
| idoklad_skip_stock_sync | $skip, $product | Returning true skips stock synchronization of the product (default true for products without stock management). |
| toret_idoklad_stock_data | $data, $product | Stock item data when exporting to iDoklad. |
| idoklad_contact_sync_data | $data, $user_id, $context | Contact data during contact synchronization. |
| idoklad_contact_sync_batch_size | $size (25) | Number of customers in one batch on the iDoklad kontakty page. |
Actions
| Hook | Parameters | When it runs |
|---|---|---|
| idoklad_send_invoice | $order_id | At the start of issuing an invoice. |
| idoklad_send_proforma | $order_id | At the start of issuing a proforma. |
| idoklad_control_proforma_status_after | $order, $status | After the order status changes once the proforma is paid. |
| idoklad_control_status_after | $order, $status | After the order status changes once the invoice is paid. |