Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Adam Capriola

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.

2 years, 8 months ago

You must be logged in to reply to this topic.