All Topics
Update term during acp/editing/saved action
Hi, I successfully followed the code example here to trigger wp_update_post on inline edits. Is there a way to do the same for terms? I tried this but it doesn’t seem to be working:
add_action( 'acp/editing/saved', 'acp_editing_saved_update_term', 10, 2 );
function acp_editing_saved_update_term( AC\Column $column, $id ) {
// Bail: Not meta type
if ( 'taxonomy' !== $column->get_meta_type() ) {
return;
}
// Update term
$taxonomy = $column->get_taxonomy();
$args = [];
wp_update_term( $id, $taxonomy, $args );
}
Thank you.
You must be logged in to reply to this topic.