mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-10 04:25:44 +03:00
Pledge Form: Add ability to resend pledge confirmation email.
Fixes #49.
This commit is contained in:
parent
63f718bd9a
commit
3f774fdb78
5 changed files with 41 additions and 13 deletions
|
@ -41,6 +41,11 @@ function render_form_new() {
|
|||
$pledge_id = filter_input( INPUT_GET, 'pledge_id', FILTER_VALIDATE_INT );
|
||||
$unverified_token = filter_input( INPUT_GET, 'auth_token', FILTER_SANITIZE_STRING );
|
||||
$email_confirmed = process_pledge_confirmation_email( $pledge_id, $action, $unverified_token );
|
||||
} else if ( filter_input( INPUT_GET, 'resend_pledge_confirmation' ) ) {
|
||||
$pledge_id = filter_input( INPUT_GET, 'pledge_id', FILTER_VALIDATE_INT );
|
||||
$complete = true;
|
||||
|
||||
Pledge\send_pledge_confirmation_email( $pledge_id, get_post()->ID );
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
|
|
@ -221,6 +221,13 @@ function save_pledge( $pledge_id, $pledge ) {
|
|||
|
||||
save_pledge_meta( $pledge_id, $submitted_meta );
|
||||
|
||||
if ( filter_input( INPUT_POST, 'resend-pledge-confirmation' ) ) {
|
||||
Pledge\send_pledge_confirmation_email(
|
||||
filter_input( INPUT_GET, 'resend-pledge-id', FILTER_VALIDATE_INT ),
|
||||
get_page_by_path( 'for-organizations' )->ID
|
||||
);
|
||||
}
|
||||
|
||||
if ( filter_input( INPUT_POST, 'resend-contributor-confirmation' ) ) {
|
||||
PledgeForm\send_contributor_confirmation_emails(
|
||||
$pledge_id,
|
||||
|
|
|
@ -156,7 +156,7 @@ function send_pledge_confirmation_email( $pledge_id, $action_page_id ) {
|
|||
|
||||
$message =
|
||||
'Thanks for committing to help keep WordPress sustainable! Please confirm this email address ' .
|
||||
'so that we can accept your pledge:' . "\n\n" .
|
||||
'in order to publish your pledge:' . "\n\n" .
|
||||
Email\get_authentication_url( $pledge_id, 'confirm_pledge_email', $action_page_id )
|
||||
;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue