Skip to content

Commit 427c395

Browse files
committed
fix creativecommons#376 - Condition added to check if user is in vouching state
1 parent c764ef9 commit 427c395

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/cc-global-network/cron/email-vouch-request-reminders.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,18 @@ function ccgn_email_vouch_request_reminders () {
111111
$day = ($now->diff($request_date))->days;
112112
$vouchers = ccgn_application_vouchers_users_ids ( $applicant_id );
113113
foreach ( $vouchers as $voucher_id ) {
114-
if ( ccgn_vouching_request_open ( $applicant_id, $voucher_id ) ) {
115-
ccgn_email_vouch_request_reminder_maybe_close (
114+
if ( ccgn_vouching_request_open ( $applicant_id, $voucher_id ) && ccgn_registration_user_is_vouchable ( $applicant_id ) ) {
115+
ccgn_email_vouch_request_reminder_maybe_close (
116116
$voucher_id,
117117
$applicant_id,
118118
$day
119119
);
120120
// This will notify the voucher if the request was closed
121-
ccgn_email_vouch_request_reminder_send (
121+
ccgn_email_vouch_request_reminder_send (
122122
$voucher_id,
123123
$applicant_id,
124124
$day
125-
);
125+
);
126126
}
127127
}
128128
}

0 commit comments

Comments
 (0)