mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-14 06:15:46 +03:00
Trigger an email on user-initiated pledge deactivation
This commit is contained in:
parent
7024cf3b2e
commit
dbe5868a41
3 changed files with 49 additions and 11 deletions
|
@ -258,13 +258,7 @@ function process_form_remove( $pledge_id, $auth_token ) {
|
|||
);
|
||||
}
|
||||
|
||||
$result = wp_update_post(
|
||||
array(
|
||||
'ID' => $pledge_id,
|
||||
'post_status' => Pledge\DEACTIVE_STATUS,
|
||||
),
|
||||
true // Return a WP_Error.
|
||||
);
|
||||
$result = Pledge\deactivate( $pledge_id, true );
|
||||
|
||||
if ( is_wp_error( $result ) ) {
|
||||
return $result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue