mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-02 01:01:18 +03:00
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:
parent
2846344b72
commit
5da4719388
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue