Created
July 29, 2013 12:27
-
-
Save corsonr/6103979 to your computer and use it in GitHub Desktop.
WooCommerce - Restrict countries shipping list
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 | |
/** | |
* WooCommerce Extra Feature | |
* -------------------------- | |
* | |
* Restrict shipping countries list | |
* | |
*/ | |
function woo_override_checkout_fields( $fields ) { | |
$fields['shipping']['shipping_country'] = array( | |
'type' => 'select', | |
'label' => __('My New Country List', 'woocommerce'), | |
'options' => array('AU' => 'Australia') | |
); | |
return $fields; | |
} | |
add_filter( 'woocommerce_checkout_fields' , 'woo_override_checkout_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment