Hook up "Remove" button

This commit is contained in:
Kelly Dwan 2019-11-12 16:18:16 -05:00
parent d5c740ae84
commit eacd2bf3f2
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
4 changed files with 59 additions and 11 deletions

View file

@ -28,6 +28,14 @@ function handler() {
'message' => sprintf( __( 'Confirmation email sent to %s.', 'wporg-5ftf' ), $contribution->post_title ),
] ) );
break;
case 'remove-contributor':
// Trash contributor.
Contributor\remove_contributor( $contributor_id );
wp_die( wp_json_encode( [
'success' => true,
] ) );
break;
}
// No matching action, we can just exit.