=== NIP Field for WooCommerce ===
Contributors: Devikit
Tags: woocommerce, nip, gus, tax id, nip field
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.3.1
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds NIP field to WooCommerce checkout with validation and order storage capabilities.

== Description ==

The "NIP Field for WooCommerce" plugin adds a NIP field to the WooCommerce order form, which is automatically saved in order details and in the order confirmation email.

https://youtu.be/jhXR5gTCdtQ

= Features =

* Adds NIP field to WooCommerce checkout above existing "Company Name" field
* Full support for both traditional and Gutenberg block checkout
* Compatible with WooCommerce High-Performance Order Storage (HPOS)
* Optional validation: 10 digits
* Field can be required or optional (configurable in settings)
* Saves NIP field value to order details (admin panel)
* Saves NIP field value to order details in customer panel (My Account)
* Saves NIP field value to WooCommerce order confirmation email

= Pro Version =

A Pro version is also available with additional features:

* Automatic company data retrieval after entering NIP
* Auto-filling "Company Name" field with GUS data
* Auto-filling address fields with GUS data
* Saving GUS data to order data

[**Learn more about Pro version**](https://devikit.pl/produkt/pole-nip-dla-woocommerce-pro/)

== Installation ==

1. Download the plugin and install it in WordPress panel.
2. Activate the plugin.
3. Go to "NIP Field for WooCommerce" menu in admin panel to configure settings.

== Frequently Asked Questions ==

= Does the plugin require WooCommerce? =

Yes, the plugin requires installed and active WooCommerce.

= Can I set NIP field as required? =

Yes, in plugin settings you can check option to make NIP field required during order placement.

= Does the plugin support WPML or other translation plugins? =

Yes, all plugin texts are prepared for translation through plugins like WPML, Loco Translate and others.

= Can I extend the plugin with custom functionality? =

Yes, the plugin provides hooks and filters that allow developers to extend its functionality.

== Screenshots ==

1. Checkout view
1. Settings in admin panel
2. Settings in admin panel
3. Settings in admin panel
4. Settings in admin panel

== Changelog ==

= 1.3.1 =
* Readme: added demo video link in description
* Readme: emphasized Pro version link styling

= 1.3.0 =
* Fix: NIP no longer duplicated in formatted billing address when company name matches customer's first and last name (affected admin order, emails, thank-you page, My Account)
* Switched NIP rendering in address to WooCommerce-native {nip} placeholder system (woocommerce_order_formatted_billing_address + woocommerce_formatted_address_replacements + woocommerce_localisation_address_formats)

= 1.2.2 =
* Small fixes

= 1.2.9 =
* Hardcode Polish text in dashboard widget for reliable display

= 1.2.8 =
* Remove JS forced widget repositioning - respect user's dashboard layout

= 1.2.7 =
* Fix: Dashboard widget translations - added strings to .pot for translate.wordpress.org
* Fix: Dashboard widget now always appears at the top of all widgets

= 1.2.6 =
* Added Devikit promo dashboard widget with accounting integrations overview

= 1.2.5 =
* Fix: WooCommerce may pass WP_Post instead of WC_Order to woocommerce_process_shop_order_meta - use WC_Order for update_meta_data()

= 1.2.4 =
* NIP field editable in admin order billing form (same as address fields, like WFirma)
* HPOS-compatible order meta save

= 1.2.1 =
* Fixed compatibility with Baselinker

= 1.2.0 =
* Fixed full compatibility for WooCommerce Gutenberg blocks checkout

= 1.1.0 =
* Added full support for WooCommerce Gutenberg blocks checkout
* Added compatibility with WooCommerce High-Performance Order Storage (HPOS)
* Improved compatibility with newer WooCommerce versions (8.8+)
* Enhanced checkout field registration for both traditional and block checkout
* Fixed issues with field display in block-based checkout pages

= 1.0.5 =
* Version synchronization fix between plugin file and readme
* Improved Pro Version link styling for better readability
* Enhanced UI consistency

= 1.0.3 =
* Version synchronization with WordPress.org
* Ensured all changes are properly deployed

= 1.0.2 =
* Updated Pro version links
* Fixed translation credits

= 1.0.1 =
* Fixing small bugs

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
Initial release 