Skip to content

Instantly share code, notes, and snippets.

@Longkt
Created April 19, 2018 16:48
Show Gist options
  • Save Longkt/49d52806c01ff8f5f6ebe4ce40abec32 to your computer and use it in GitHub Desktop.
Save Longkt/49d52806c01ff8f5f6ebe4ce40abec32 to your computer and use it in GitHub Desktop.
// In general settings
add_filter( 'woocommerce_general_settings', array( $this, 'add_VN_districts_in_general_settings' ) );
public function add_VN_districts_in_general_settings( $settings ) {
$settings[3] = array(
'title' => __( 'City', 'woocommerce' ),
'desc' => __( 'The city in which your business is located.', 'woocommerce' ),
'id' => 'woocommerce_store_city',
'default' => '',
'type' => 'select',
'desc_tip' => true,
'options' => array(
'HUNG-YEN' => 'Hung Yen',
'HA-GIANG' => 'Ha Giang',
// Get option for provinces selected $key => $value
),
);
return $settings;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment