Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vender Somente para Estado Específico - WooCommerce
<?php
/**
* Brazillian states
* Function - Vender Somente para Estados Específicos - WooCommerce
*/
function wc_especifico_estado( $states ) {
$states['BR'] = array(
'SP' => __( 'S&atilde;o Paulo', 'woocommerce' ),
'RJ' => __( 'Rio de Janeiro', 'woocommerce' ),
);
return $states;
}
add_filter( 'woocommerce_states', 'wc_especifico_estado' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment