Last active
July 2, 2020 05:21
-
-
Save rynaldos-zz/6893f3e3d8d39cdd457e3373c9f1358c to your computer and use it in GitHub Desktop.
[WooCommerce 3.0] Add Northern Ireland to shipping zones
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
| // https://gist.github.com/WillBrubaker/b9b2415e32a19833aa9c8b1845f64489 | |
| add_filter( 'woocommerce_countries', 'handsome_bearded_guy_add_my_country' ); | |
| function handsome_bearded_guy_add_my_country( $countries ) { | |
| $new_countries = array( | |
| 'NIRE' => __( 'Northern Ireland', 'woocommerce' ), | |
| ); | |
| return array_merge( $countries, $new_countries ); | |
| } | |
| // https://gist.github.com/WillBrubaker/8194416832c358e44168897f942dd0ef | |
| add_filter( 'woocommerce_continents', 'handsome_bearded_guy_add_my_country_to_continents' ); | |
| function handsome_bearded_guy_add_my_country_to_continents( $continents ) { | |
| $continents['EU']['countries'][] = 'NIRE'; | |
| return $continents; | |
| } | |
| // Kudos to https://gist.github.com/WillBrubaker for the original snippets | |
| // Did this help? Donate me some BTC: 1BEsm8VMkYhSFJ92cvUYwxCtsfsB2rBfiG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can we add more than one countriess through this ??? If yes can help me with that ??