Contributors: Prevent adding to a pledge twice.

This syncs `r17275-dotorg` to the canonical Git repo.
This commit is contained in:
Corey McKrill 2022-03-17 15:07:30 -07:00 committed by Ian Dunn
parent 5c0b79fa86
commit a545168ef2
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
2 changed files with 32 additions and 5 deletions

View file

@ -55,7 +55,7 @@ function manage_contributors_handler() {
case 'add-contributor':
$pledge = get_post( $pledge_id );
$new_contributors = Contributor\parse_contributors( $_POST['contributors'] );
$new_contributors = Contributor\parse_contributors( $_POST['contributors'], $pledge->ID );
if ( is_wp_error( $new_contributors ) ) {
wp_die( wp_json_encode( array(
'success' => false,