That should work. You will need to add the rest of the states and make sure that your taxonomy is actually called "States", but other than that it should be fine:
<?php $foo_states = array( 'Alabama', 'Alaska', 'Arizona', 'Arkansas' ); function foo_install() { global $foo_states; foreach ( (array) $foo_states as $state ) { wp_insert_term($state, 'States'); } } register_activation_hook(__FILE__, 'foo_install') function foo_uninstall() { global $foo_states; foreach ( (array) $foo_states as $state ) { wp_delete_term(get_term_by('name', $state, 'States')->term_id, 'States'); } } register_deactivation_hook(__FILE__, 'foo_uninstall'); ?>
source share