Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_filter( 'post_row_actions', 'remove_duplicate_capability', 20, 2 );
add_filter( 'page_row_actions', 'remove_duplicate_capability', 20, 2 );
function remove_duplicate_capability( $actions, $post ) {
if ( $post->post_type != 'product' ) {
return $actions;
}
if ( isset( $actions['duplicate'] ) ) {
unset( $actions['duplicate'] );
}
return $actions;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment