=== Popbill KR for WooCommerce ===
Contributors: catcodestudio
Tags: popbill, tax invoice, korea, woocommerce, 세금계산서
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sends WooCommerce orders to Popbill as Korean electronic tax invoices (전자세금계산서): buyer, lines and totals in your own Popbill account.

== Description ==

Korean B2B web shops have to issue an electronic tax invoice for every sale to a business. This plugin hands the order to the public Popbill API with your own Popbill keys, so the invoice does not have to be typed again:

* **Order to tax invoice in one click** — from the order edit screen (the Popbill KR box or the order actions menu) the plugin saves a draft tax invoice in your Popbill account with the buyer, every order line, shipping and fees.
* **Your numbers** — amounts are taken in won from the order; tax comes from WooCommerce, or 10% is added to taxable lines that carry none (a setting you can switch off). Taxable, zero-rated and exempt invoices are supported.
* **Buyer data** — business registration number from an order meta field you name, company, representative, address, e-mail and phone from the billing details.
* **No double documents** — the document number is built from the order number and checked in Popbill before anything is created; pressing the button again links the existing document instead of creating a second one, and a send that failed halfway continues where it stopped.
* **Status** — the Popbill status code and the tax office approval number are read back and shown on the order.
* **Failures are visible** — the reason Popbill gave is written to the order notes and shown in the box.
* **Test environment** — a switch between the Popbill test environment and production.
* **Refunds** — a refund on a sent order leaves a note: revised tax invoices are not created automatically.
* HPOS (custom order tables) supported. Korean translation included.

// @pro-begin
= Pro =

The Pro version is sold on [catcode.com.ua](https://catcode.com.ua/modules/popbill-kr-woocommerce/), with a 7-day trial that never starts by itself:

* **Automatic sending** when an order reaches the statuses you choose, with retries.
* **Issue at once** — the tax invoice is issued through Popbill instead of waiting as a draft.
* **Bulk action** in the order list.

The licence runs for 1-5 years and includes updates and support for that term; a purchased licence keeps its Pro features after the term ends.
// @pro-end

= Not tax advice =

The plugin sends what your shop and your settings describe. Check every tax invoice before you rely on it for your tax filings. Popbill is a trademark of its owner; this plugin is made by CatCode and is not made or endorsed by Popbill or Linkhub.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. WooCommerce → Popbill KR: enter the LinkID, SecretKey and the business registration number of the Popbill member, choose the environment and save; the connection is tested.
3. Fill in your company details and the order meta key that holds the buyer's business registration number.
4. Open an order and press "Save as draft in Popbill".

== Frequently Asked Questions ==

= Where do I get the LinkID and SecretKey? =

From your Popbill developer account (the API integration section of Popbill). Test and production accounts are separate at Popbill.

= Which orders are sent? =

Only orders in won with a 10-digit buyer business registration number. Sales to private persons do not get a tax invoice from this plugin.

= Does it issue the tax invoice by itself? =

The plugin saves a draft that you issue in Popbill.
// @pro-begin
Pro can issue at once and send orders automatically.
// @pro-end

= Does it handle refunds? =

Not yet. The order gets a note so the refund is not forgotten; the revised tax invoice is made in Popbill.

== Changelog ==

= 1.0.0 =
* First release: draft tax invoice from a WooCommerce order, status read-back, test and production environments.
// @pro-begin
* Pro: automatic sending with retries, issue at once, bulk action.
* Pro: updates from catcode.com.ua.
// @pro-end
