X

Remove the ‘Delete’ option from the Payment List Quick Action

Adding this snippet to your function.php when using Easy Digital Downloads will remove the 'Delete' option from the Payment List Quick Action. This can require a fine tuning of the user roles, typically handeled in a plugin change current_user_can( 'delete_shop_payment' ) to adjust who an and can't use this option.


Code Snippet:


function ck_edd_remove_payment_delete_action( $row_actions, $payment ) {
if ( !current_user_can( 'delete_shop_payment' ) )
unset( $row_actions['delete'] );
return $row_actions;
}
add_filter( 'edd_payment_row_actions', 'ck_edd_remove_payment_delete_action', 10, 2 );

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!