Skip to main content
Agency Program Hosting from 10% off. A dedicated account manager. Priority support. Built for growing agencies. Hosting from 10% off, a dedicated account manager and priority support for growing agencies. Speak to the team Join free
NIF (Num. de Contribuinte Português) for WooCommerce icon

NIF (Num. de Contribuinte Português) for WooCommerce

v8.5
by Marco Almeida | Webdados · 5.0 (8 reviews)

This plugin adds the Portuguese NIF/NIPC as a new field to WooCommerce checkout and order details, if the billing address / customer is from Portugal.

5K+ active installs Updated Nov 17, 2026 Tested to 7.1.5 Requires PHP 7.4
Try Demo Download
Pre-installed Ready in ~10s No card
NIF (Num. de Contribuinte Português) for WooCommerce

About NIF (Num. de Contribuinte Português) for WooCommerce

This plugin adds a new field for the Portuguese VAT identification number (NIF/NIPC) to the WooCommerce checkout and order details for customers with a billing address in Portugal. It also allows customers to edit their NIF/NIPC field in their account settings. The plugin is compatible with WooCommerce High-Performance Order Storage and WooCommerce Checkout Block.

Changelog

8.5 – 2026-11-17

  • [FIX] Blocks checkout: on a slow shop, the NIF field could go back to the first digits typed while the customer was still typing, and the order was then saved with an incomplete NIF
  • [FIX] Blocks checkout: the order now always gets the NIF shown in the field when “Place Order” is clicked, even when it is clicked right after typing
  • [FIX] Blocks checkout: “Place Order” no longer stays disabled when saving the NIF fails
  • [DEV] Requires WordPress 6.7, WooCommerce 9.9, and PHP 7.4
  • [DEV] Tested up to WordPress 7.2-RC1-65559 and WooCommerce 11.3.0

8.4 – 2026-09-30

  • [DEV] Tested up to WordPress 7.2-alpha-64009 and WooCommerce 11.2.0-beta.2

8.3 – 2026-08-26

  • [NEW] There is now an alternative to this plugin for shops selling to businesses across the European Union: VAT Number and EU VIES Validation for WooCommerce, our premium plugin, which validates VAT identification numbers for every EU country, confirms them against VIES and removes VAT on qualifying intra-EU B2B orders, and whose Zero-Touch Migration reads the numbers this plugin already stored so there is nothing to export or import. It is introduced through a dismissible notice, which is never shown if that plugin is already active
  • [DEV] Tested up to WordPress 7.2-alpha-63347 and WooCommerce 11.1.0-beta.2

8.2 – 2026-08-24

  • [FIX] The optional NIF prefix check now uses the complete list of prefixes issued by the Autoridade Tributária (1, 2, 3, 45, 5, 6, 70, 71, 72, 74, 75, 77, 78, 79, 8, 90, 91, 98 and 99). It previously rejected valid numbers belonging to non-residents, undivided estates and investment funds, and accepted 92 to 97, which are never issued. This check only runs when woocommerce_valida_nif() is called with its second argument set to false, so the default behaviour is unchanged
  • [FIX] Blocks checkout: the invalid NIF message now keeps any formatting or links added through the woocommerce_nif_invalid_message filter, instead of showing the markup as plain text
  • [DEV] Bundled ifthenpay suggestion module updated
  • [DEV] Tested up to WordPress 7.2-alpha-63323 and WooCommerce 11.1.0-beta.1

8.1 – 2026-08-02

  • [FIX] Blocks checkout: NIF is now also validated server-side when the order is processed, not just client-side, so a missing or invalid NIF can no longer be submitted with JavaScript disabled or by calling the Store API directly
  • [DEV] Bundled ifthenpay suggestion module updated

8.0 – 2026-06-22

  • [NEW] Complete rewrite the blocks checkout field for performance
  • [FIX] Blocks checkout: validation error no longer appears while typing — it shows only after leaving the NIF field
  • [FIX] Blocks checkout: NIF is now validated client-side for instant feedback, without waiting for a server round-trip
  • [FIX] Blocks checkout: “Place Order” button no longer flickers during typing (debounced server sync)
  • [FIX] woocommerce_nif_invalid_message filter now applied in the “My Account” billing address save path, consistent with the checkout
  • [FIX] WordPress Coding Standards improvements in bundled modules (nonce on admin notice dismiss, safe HTML output)
  • [DEV] Tested up to WordPress 7.1-alpha-62536 and WooCommerce 10.9.0-beta.2

7.3 – 2026-06-15

  • [FIX] NIF saved on the customer’s profile / “My Account” billing address wasn’t pre-filled on the WooCommerce Checkout Block
  • [FIX] NIF field markup on the WooCommerce Checkout Block didn’t match the standard checkout step structure (heading container)
  • [DEV] Removed the unused/stale PTWOO_NIF_VERSION constant; checkout block assets now version off the plugin header version
  • [DEV] Tested up to WordPress 7.1-alpha-62456 and WooCommerce 10.9.0-beta.1

7.2 – 2026-04-12

  • [FIX] PHP fatal error, introduced in 7.0, in specific scenarios
  • [FIX] Version number

7.0 – 2026-04-10

  • [NEW] Plugin ownership transferred from Marco Almeida | Webdados to Naked Cat Plugins on WordPress.org – No worries, we’re the same people 🙂
  • [TWEAK] Added our ifthenpay plugin as a suggested payment gateway in WooCommerce, if still not present (can be removed by setting the NAKEDCAT_RECOMMEND_IFTHENPAY constant to true)
  • [DEV] Removed load_plugin_textdomain call as WordPress handles it
  • [DEV] Improved PHPCS rules
  • [DEV] Implement release automations via GitHub Actions
  • [DEV] Tested up to WordPress 7.0-RC2-62197 and WooCommerce 10.7.0-beta.2

6.7 – 2025-06-24

  • [TWEAK] Improve the mechanism to keep the “Invoicing with InvoiceXpress for WooCommerce” admin notice from showing to the same user in the next 120 days after dismissal
  • [DEV] Tested up to WordPress 6.9-alpha-60342 and WooCommerce 10.0.0-rc.1

6.6 – 2025-04-14

  • [NEW] We are now called Naked Cat Plugins 😻
  • [DEV] Requires WordPress 5.8, WooCommerce 7.1, and PHP 7.2
  • [DEV] Tested up to WordPress 6.8-RC3-60146 and WooCommerce 9.8.1

6.5 – 2024-10-08

  • [FIX] Load text domain at the right time to avoid PHP notices on WordPress 6.7 and above
  • [DEV] Tested up to WordPress 6.7-beta1-59184 and WooCommerce 9.4.0-beta.2

6.4 – 2024-07-25

  • [NEW] woocommerce_nif_invalid_message filter to change the invalid Portuguese NIF/NIPC message on checkout
  • [DEV] Make blocks checkout use the same invalid message as the classic checkout, thus benefiting from the same filter
  • [DEV] Block lock position defined in block.json
  • [DEV] Tested up to WordPress 6.7-alpha-58796 and WooCommerce 9.1.3

6.3 – 2024-03-27

  • [DEV] Set Requires Plugins tag to woocommerce
  • [DEV] Tested up to WordPress 6.5-RC3-57875 and WooCommerce 8.8.0-beta.1

6.2 – 2024-02-18

  • [DEV] Simplify block build process and implement SVG accessibility attributes
  • [DEV] Tested up to WordPress 6.5-beta1-57650 and WooCommerce 8.6.0

6.1 – 2024-02-01

  • [FIX] Correctly load block i18n on the block javascript files
  • [DEV] Declare cart and checkout blocks compatibility (just in case)
  • [DEV] Tested up to WordPress 6.5-alpha-57505 and WooCommerce 8.6-0-beta.1

6.0 – 2024-01-30

  • [NEW] Block-based Checkout compatibility (in beta)
  • [TWEAK] Improve filters_examples.php
  • [DEV] Requires WordPress 5.6 and WooCommerce 6.0
  • [DEV] Tested up to WordPress 6.5-alpha-57378 and WooCommerce 8.5.2

5.6 – 2024-01-10

  • Fix checkout validation feedback on WooCommerce 8.5 and above
  • Tested up to WordPress 6.5-alpha-57258 and WooCommerce 8.5

5.5 – 2023-11-17

  • Tested up to WordPress 6.5-alpha-57114 and WooCommerce 8.3.0

5.4 – 2023-09-07

  • Do not accept “000000000” as NIF number, if validation is active
  • Fixed HTML markup on the “Thank You” page
  • Tested up to WordPress 6.4-alpha-56530 and WooCommerce 8.1.0-rc.1

5.3 – 2023-04-18

  • Fixed a bug introduced on version 5.2 when using the woocommerce_nif_field_validate filter to validate the Portuguese NIF

5.2 – 2023-04-17

  • WordPress Coding Standards
  • Tested up to WordPress 6.3-alpha-55644 and WooCommerce 7.6.0

5.1 – 2022-11-10

  • Tested and confirmed WooCommerce HPOS compatibility
  • Requires WooCommerce 5.0
  • Tested up to WordPress 6.2-alpha-54748 and WooCommerce 7.1

5.0.0 – 2022-09-20

  • If NIF validation is active by using the woocommerce_nif_field_validate filter, the field will be set as invalid om the checkout form when the validation is performed and fails
  • Removed all WooCommerce pre 3.0 code
  • Requires WooCommerce 4.0
  • Tested up to WordPress 6.1-alpha-54043 and WooCommerce 6.9.2

4.3.0 – 2022-06-29

  • New brand: PT Woo Plugins 🥳
  • Requires WordPress 5.0, WooCommerce 3.0 and PHP 7.0
  • Tested up to WordPress 6.1-alpha-53556 and WooCommerce 6.7.0-beta.2

4.2.6 – 2022-02-23

  • Check if the is_checkout function exists before calling it
  • Tested up to WordPress 6.0-alpha-52790 and WooCommerce 6.3.0-rc.1

4.2.5 – 2021-03-10

  • Tested up to WordPress 5.8-alpha-50516 and WooCommerce 5.1.0

4.2.4.2

  • Tested up to WordPress 5.6-alpha-49064 and WooCommerce 4.6.0-beta.1

4.2.4.1

  • Tested up to WooCommerce 4.0.0

4.2.4

  • Changes on the InvoiceXpress banner
  • Tested up to WordPress 5.3.3-alpha-46995 and WooCommerce 3.9.0-rc.2

4.2.3

  • Hide the InvoiceXpress nag if the invoicing is already installed and active
  • Tested up to WordPress 5.3.1-alpha-46798 and WooCommerce 3.8.1

4.2.2

  • Change InvoiceXpress nag interval from 30 to 90 days
  • Tested up to WordPress 5.2.4-alpha-46074 and WooCommerce 3.8.0-beta.1
  • Requires PHP 5.6

4.2.1

  • NIF field on Subscriptions via the admin order screen (thanks @ptravassos)
  • Tested up to WooCommerce 3.6.5 and WordPress 5.2.2

4.2

  • Add NIF to the WooCommerce REST orders and customers endpoints

4.1.3

  • Fixed a fatal error when the woocommerce_nif_field_validate was set to true and the customer doesn’t have a country associated yet
  • Tested up to WooCommerce 3.5.5 and WordPress 5.0.3

4.1.2

  • Tested up to WooCommerce 3.5.2
  • Bumped WC tested up tag
  • Bumped Requires at least tag

4.1.1

  • Tested up to WooCommerce 3.5
  • Bumped WC tested up tag
  • Bumped Requires at least tag

4.1

  • Using WC()->customer->get_billing_country() instead of WC()->customer->get_country() on WooCommerce 3.0 and above

4.0

  • Toggle the NIF field via javascript on the checkout page by default – if you need to get back to the old mechanism, you should false on the woocommerce_nif_use_javascript filter
  • New woocommerce_nif_show_all_countries to show the field for all countries instead of only to portuguese customers (not recommended)
  • Tested up to WooCommerce 3.3
  • Filters examples updated
  • Improved the FAQ

3.3

  • Experimental javascript toggle of the NIF field on the checkout page, so that the field is shown or hidden depending on the billing country selection (by returning true on the woocommerce_nif_use_javascript filter) – this will probably be default on a later version, after heavy user testing
  • GDPR information
  • Improved the FAQ

3.2

  • Fixed a bug where if the validation is active but the field is not required, the checkout wouldn’t go ahead if the client didn’t fill the field
  • Validation of the field on the “My Account – Billing Address” form
  • Bumped Tested up to and WC tested up to tags
  • Better code formatting standards
  • Improved the FAQ

3.1

  • Removed the translation files from the plugin lang folder (the translations are now managed on WordPress.org’s GlotPress tool and will be automatically downloaded from there)
  • Tested up to WooCommerce 3.2
  • Added WC tested up to tag on the plugin main file
  • Bumped Tested up to tag

3.0

  • It’s now possible to validate the Portuguese NIF/NIPC check digit entered by the customer (by returninig true on the woocommerce_nif_field_validate filter)
  • Tested up to WooCommerce 3.0.0-rc.2
  • Changed version tests from 2.7 to 3.0
  • New autocomplete parameter set to ‘on’
  • New priority parameter set to ‘120’
  • New maxlength parameter set to ‘9’
  • New filters to manipulate the field label, placeholder, required, class, clear, autocomplete and maxlength parameters (check filters_examples.php)
  • Bumped Tested up to tag

2.1

  • WooCommerce 2.7 compatibility
  • NIF/NIPC is also shown and editable, in admin, on the user edit screen (alongside with other Billing Address fields)

2.0.2

  • Fix typos in the readme.txt file (Thanks Daniel Matos)

2.0.1

  • Bumped Tested up to and Requires at least tags

2.0

  • Completely rewritten
  • NIF/NIPC is added to the Billing Address fields on the Checkout (as long as the customer country is Portugal)
  • You can also edit the user NIF/NIPC on the “My Account – Billing Address” form
  • NIF/NIPC is also shown and editable on the order screen (alongside with other Billing Address fields)
  • NIF/NIPC is added to the Customer Details section on Emails and Thank You page.

1.3

  • Adds the field to the My Acccount / Edit Billing Address form

1.2.2

  • The value is now auto-filled with the last one used

1.2.1

  • Small fix to avoid php notices

1.2

  • WordPress Multisite support

1.1.1

  • Forgot to update version number on the php file.

1.1

  • Bug fix after WooCommerce 2.1 changes.

1.0

  • Initial release.

Try other plugins

Yoast SEO icon

Yoast SEO

4.8 · 10M+ installs

Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO…

LiteSpeed Cache icon

LiteSpeed Cache

4.8 · 7M+ installs

All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...

WooCommerce icon

WooCommerce

4.5 · 7M+ installs

Everything you need to launch an online store in days and keep it growing for years. From your…