Pledge Form: Also check drafts for existing pledges

This closes a loophole where multiple pledges with the same email
and/or domain could be created while all were in draft form, and then
they could all be confirmed and published afterward.
This commit is contained in:
Corey McKrill 2019-10-18 16:19:56 -07:00
parent 2846344b72
commit 5da4719388
No known key found for this signature in database
GPG key ID: C2C0746F7BF17E38

View file

@ -202,7 +202,7 @@ function get_form_submission() {
function has_existing_pledge( $key, $key_type, int $current_pledge_id = 0 ) {
$args = array(
'post_type' => Pledge\CPT_ID,
'post_status' => array( 'pending', 'publish' ),
'post_status' => array( 'draft', 'pending', 'publish' ),
);
switch ( $key_type ) {