Created
November 28, 2021 01:13
-
-
Save cesjam7/08f5a15ed611b745c36e3e6c129ab983 to your computer and use it in GitHub Desktop.
Renombrar, ordenar y eliminar estados de WooCommerce
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 add_filter( 'woocommerce_states', 'c7_woocommerce_states' ); | |
function c7_woocommerce_states( $states ) { | |
$states['PE'] = array( | |
'LMA' => 'Lima Metropolitana', | |
'AMA' => 'Amazonas', | |
'ANC' => 'Ancash', | |
'APU' => 'Apurímac', | |
'ARE' => 'Arequipa', | |
'AYA' => 'Ayacucho', | |
'CAJ' => 'Cajamarca', | |
'CAL' => 'Callao', | |
'CUS' => 'Cusco', | |
'HUV' => 'Huancavelica', | |
'HUC' => 'Huánuco', | |
'ICA' => 'Ica', | |
'JUN' => 'Junín', | |
'LAL' => 'La Libertad', | |
'LAM' => 'Lambayeque', | |
'LIM' => 'Lima Provincia', | |
'LOR' => 'Loreto', | |
'MDD' => 'Madre de Dios', | |
'MOQ' => 'Moquegua', | |
'PAS' => 'Pasco', | |
'PIU' => 'Piura', | |
'PUN' => 'Puno', | |
'SAM' => 'San Martín', | |
'TAC' => 'Tacna', | |
'TUM' => 'Tumbes', | |
'UCA' => 'Ucayali' | |
); | |
unset($states['PE']['CAL']); | |
return $states; | |
} ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment