Last active
December 5, 2025 11:22
-
-
Save aldavigdis/bce053dc21aec23279baf4728357d687 to your computer and use it in GitHub Desktop.
Add Iceland to the WooCommerce list of countries that use VAT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types = 1); | |
| /* | |
| Add Iceland to the WooCommerce list of countries that use VAT | |
| A PR has been sent over to the WooCommerce codebase, at | |
| https://github.com/woocommerce/woocommerce/pull/62126 but it | |
| is unlikely to result in any concrete results and has not been | |
| looked at as of this wrting. | |
| */ | |
| add_filter( | |
| 'woocommerce_vat_countries', | |
| function ( array $countries ): array { | |
| if ( key_exists( 'IS', $countries ) ) { | |
| return $countries; | |
| } | |
| return array_merge( $countries, array( 'IS' ) ); | |
| }, | |
| 10, | |
| 1 | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment