mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 10:05:43 +03:00
Contributors: Prevent adding to a pledge twice.
This syncs `r17275-dotorg` to the canonical Git repo.
This commit is contained in:
parent
5c0b79fa86
commit
a545168ef2
2 changed files with 32 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue