mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-05 10:25:45 +03:00
Send confirmation emails for existing pledges to the "Manage Pledge" page
This commit is contained in:
parent
0352c42615
commit
34826c9e55
1 changed files with 4 additions and 3 deletions
|
@ -280,10 +280,11 @@ function save_pledge( $pledge_id, $pledge ) {
|
||||||
|
|
||||||
save_pledge_meta( $pledge_id, $submitted_meta );
|
save_pledge_meta( $pledge_id, $submitted_meta );
|
||||||
|
|
||||||
|
// Fired if the "Resend Confirmation" button was clicked in wp-admin.
|
||||||
if ( filter_input( INPUT_POST, 'resend-pledge-confirmation' ) ) {
|
if ( filter_input( INPUT_POST, 'resend-pledge-confirmation' ) ) {
|
||||||
Email\send_pledge_confirmation_email(
|
Email\send_pledge_confirmation_email(
|
||||||
filter_input( INPUT_GET, 'resend-pledge-id', FILTER_VALIDATE_INT ),
|
filter_input( INPUT_GET, 'resend-pledge-id', FILTER_VALIDATE_INT ),
|
||||||
get_page_by_path( 'for-organizations' )->ID
|
get_page_by_path( 'manage-pledge' )->ID
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -351,8 +352,8 @@ function update_generated_meta( $meta_id, $object_id, $meta_key, $_meta_value )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_PREFIX . 'org-pledge-email':
|
case META_PREFIX . 'org-pledge-email':
|
||||||
$form_page_id = get_page_by_path( 'for-organizations' )->ID;
|
$landing_page = get_page_by_path( 'manage-pledge' )->ID;
|
||||||
Email\send_pledge_confirmation_email( $object_id, $form_page_id );
|
Email\send_pledge_confirmation_email( $object_id, $landing_page );
|
||||||
delete_post_meta( $object_id, META_PREFIX . 'pledge-email-confirmed' );
|
delete_post_meta( $object_id, META_PREFIX . 'pledge-email-confirmed' );
|
||||||
// Flip pledge back to pending.
|
// Flip pledge back to pending.
|
||||||
wp_update_post( array(
|
wp_update_post( array(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue