=== Invoxa GST for WooCommerce ===
Contributors: titasappsbrain
Tags: gst, woocommerce, india, tax, invoice
Requires at least: 5.6
Tested up to: 7.0
Requires PHP: 7.2
Requires Plugins: woocommerce
Stable tag: 1.0.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

GST automation for WooCommerce stores in India. Handles CGST, SGST, and IGST calculations, tax invoices, GSTR-1 export, and HSN/SAC codes.

== Description ==

Invoxa GST for WooCommerce adds GST compliance features to WooCommerce for stores operating in India.

**Features**

* Automatic CGST + SGST for intra-state orders
* Automatic IGST for inter-state orders
* Smart state detection using buyer billing address or GSTIN
* Place of Supply field on invoices (GST Act 2017 compliant)
* Printable GST tax invoices with HSN/SAC codes
* GSTR-1 export in B2B CSV, B2C CSV, and JSON formats
* GST reports with date range filtering and CSV export
* HSN/SAC code manager with common codes pre-loaded
* Per-product and per-variation GST rate override
* GSTIN field at checkout for business customers
* GST breakdown in WooCommerce order emails
* Compatible with WooCommerce High Performance Order Storage (HPOS)
* Compatible with PHP 7.2 and later

**GST Calculation Logic**

Compares the store state (set in Settings) with the customer billing state:

* Same state: CGST = Rate ÷ 2, SGST = Rate ÷ 2
* Different state: IGST = Rate

Rates are set per product or variation, with a global default fallback.

**Privacy**

This plugin does not collect, store, or transmit any user data to external servers. All data is stored in your WordPress database.

== Installation ==

1. Upload the `invoxa-gst-woocommerce` folder to `/wp-content/plugins/`.
2. Activate from **Plugins → Installed Plugins**.
3. Go to **WooCommerce → Invoxa GST → Settings**.
4. Enter your GSTIN, registered address, and store state.
5. Set your default GST rate and tax mode.
6. Assign HSN/SAC codes to products in the product editor.

== Frequently Asked Questions ==

= Does this work with WooCommerce HPOS? =
Yes. This plugin declares full compatibility with WooCommerce High Performance Order Storage.

= What PHP version is required? =
PHP 7.2 or higher.

= How is CGST/SGST vs IGST determined? =
Set your store state in Settings. If the customer billing state matches, CGST + SGST apply (intra-state). Otherwise IGST applies (inter-state).

= Does it work with variable products? =
Yes. HSN/SAC codes and GST rates can be set at the parent level and overridden per variation.

= Does it work for manually created admin orders? =
Yes. GST is calculated automatically when orders are saved in the WooCommerce admin.

= Where is data stored? =
All data, including GSTIN numbers entered at checkout, is stored only in your WordPress database.

= How do I file GSTR-1? =
Use the GSTR-1 tab to export B2B and B2C CSV files for the relevant period.

== Screenshots ==

1. Dashboard with GST summary cards and recent orders.
2. Tax Invoice with Place of Supply, HSN codes, and CGST/SGST/IGST breakdown.
3. GST Reports with date filter, summary totals, and CSV export.
4. Settings page for GSTIN, store state, tax mode, and invoice configuration.
5. HSN/SAC Code Manager with searchable code list.
6. GSTR-1 export options for B2B, B2C, and JSON formats.

== Changelog ==

= 1.0.4 =
Fixed: HSN/SAC search returned "Sorry, you are not allowed to access this page" due to a stale page slug in the search form. Fixed unsaved-changes JS on Settings (form ID and localized variable name mismatch). Cleaned up leftover legacy code references in CSS/JS and CSV export footer URLs.

= 1.0.3 =
Fixed: Plugin slug renamed to invoxa-gst-for-woocommerce (trademark compliance). Removed deprecated load_plugin_textdomain(). Fixed all Plugin Check errors.

= 1.0.2 =
Fixed: All Plugin Check errors. Improved security: sanitize_text_field on all nonces, sanitize_key on GET params, wp_strip_all_tags instead of strip_tags, absint on count() output, proper phpcs:ignore placement.

= 1.0.1 =
Security hardening: nonce verification, input sanitization, and output escaping improvements.

= 1.0.0 =
* Initial release.
* Automatic CGST/SGST/IGST calculation with dynamic rate split.
* Place of Supply detection from GSTIN prefix or billing state.
* GSTIN state code map for all 38 Indian states and territories.
* Printable GST tax invoices with HSN/SAC codes.
* GSTR-1 B2B CSV, B2C CSV, and JSON export.
* HSN/SAC Code Manager with seeded common codes.
* GST Reports dashboard with date range filter and CSV export.
* GSTIN field at WooCommerce checkout.
* GST breakdown in order emails and customer order pages.
* HPOS compatible.
* uninstall.php for clean data removal.

== Upgrade Notice ==

= 1.0.3 =
Fixed: Plugin slug renamed to invoxa-gst-for-woocommerce (trademark compliance). Removed deprecated load_plugin_textdomain(). Fixed all Plugin Check errors.

= 1.0.2 =
Fixed: All Plugin Check errors. Improved security: sanitize_text_field on all nonces, sanitize_key on GET params, wp_strip_all_tags instead of strip_tags, absint on count() output, proper phpcs:ignore placement.

= 1.0.1 =
Security hardening: nonce verification, input sanitization, and output escaping improvements.

= 1.0.0 =
Initial release.
