I have a custom taxonomy called location. When adding a new location term, I need to save a value to a taxonomy field called "term-creator-id". I've found the create_category hook and written this up roughly:
function sf_save_term_creator_id( $term_id, $taxonomy_term_id ) {
$term_creator_id = '30';
update_term_meta( $taxonomy_term_id, 'wpcf-term-creator-id', $term_creator_id );
}
add_action( 'create_category', 'sf_save_term_creator_id', 10, 2 );
However it doesn't seem to do what's needed.
Is there a separate hook I should be using? I couldn't find anything in the docs- could you possibly point me in the right direction please? Cheers!