Add a new country to countries list
<?php | |
add_filter( 'woocommerce_countries', 'gnwooc2_ajouter_pays' ); | |
function gnwooc2_ajouter_pays( $countries ) { | |
$new_countries = array( | |
'NIRE' => __( 'Irlande du NORD', 'woocommerce' ), | |
); | |
return array_merge( $countries, $new_countries ); | |
} | |
add_filter( 'woocommerce_continents', 'gnwooc2_ajouter_pays_continents' ); | |
function gnwooc2_ajouter_pays_continents( $continents ) { | |
$continents['EU']['countries'][] = 'NIRE'; | |
return $continents; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment