Skip to content

Instantly share code, notes, and snippets.

@chrdesigner
Last active July 30, 2018 20:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrdesigner/9e74ed370944f0b0c60a to your computer and use it in GitHub Desktop.
Save chrdesigner/9e74ed370944f0b0c60a to your computer and use it in GitHub Desktop.
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