Hi!
I’m hoping someone can help me as I can’t get this to work 🙁
I’m reading a csv to update a custom taxonomy and attach a value to a custom field (t_id)
When I run the code below the update_field value isn’t entering the value into the db correctly, can anyone advise?
$new_term = wp_insert_term( 'test name, 'my_taxonomy', array( 'slug' => 'test-name' ) );
//if successfull...
if( !is_wp_error( $new_term ) ){
//add custom fields
update_field( 't_id', 99, 'my_taxonomy_' . $new_term['term_id'] );
}