=== Račun123 for WooCommerce ===
Contributors: racun123
Tags: woocommerce, invoicing, invoices, ecommerce, order-sync
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WooCommerce with Račun123 and automatically create invoices from completed orders.

== Description ==

Račun123 for WooCommerce connects your WooCommerce store with the Račun123 application and automatically sends completed orders for invoice creation.

The plugin is designed for merchants who want a simple and reliable integration with Račun123 without complex technical setup.

Main features:
- Automatically sends WooCommerce orders to Račun123 when the order is marked as Completed
- Simple setup using API URL and API key from Račun123
- Manual resend option directly from the WooCommerce order screen
- Retry support for failed synchronizations
- Sync status visible in WooCommerce admin
- Support for Slovenian tax compliance, handled within the Račun123 application

How it works:
1. Enable WooCommerce integration in Račun123
2. Copy your API URL and API key
3. Enter the data into the plugin settings
4. Mark a WooCommerce order as Completed
5. The plugin sends order data to Račun123, where an invoice is created

Requirements:
- WordPress
- WooCommerce
- Active Račun123 account (Napredni package or higher)

Note:
Tax reporting and fiscalization are handled inside the Račun123 application depending on your configuration.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/racun123-for-woocommerce`, or install via the WordPress plugin screen.
2. Activate the plugin in WordPress.
3. Go to WooCommerce → Račun123.
4. Open Račun123 and go to Integrations.
5. Copy API URL and API key.
6. Paste them into the plugin settings and save.
7. Mark a test order as Completed to verify the connection.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active.

= When is the order sent to Račun123? =

The order is sent when the WooCommerce order status is set to Completed.

= Can I resend an order manually? =

Yes. You can resend an order from the WooCommerce order admin screen.

= What data is sent to Račun123? =

The plugin sends customer data, order items, totals, currency, payment method, and metadata required for invoice creation.

= Does the plugin use WooCommerce webhooks? =

No. The plugin sends data via a direct API POST request to the configured Račun123 endpoint.

= How do I get the API URL and API key? =

You can obtain them in the Račun123 application under Integrations.

= Does the plugin handle tax compliance and fiscalization? =

Tax compliance and fiscalization are handled within the Račun123 application.

== Screenshots ==

1. Račun123 integrations with API key and API URL
2. Račun123 for WooCommerce setup screen in WordPress
3. Example of a successfully created invoice in Račun123

== Changelog ==

= 1.0.0 =
* Initial public release

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Changelog ==

= 1.0.1 =
* Improved API payload (isPaid, metadata, discount)
* Added invoiceNumber and pdfUrl handling
* Improved error handling (partial success)
* Fixed optional fields (no null values sent)
* Updated webhook documentation