Trigger an email on user-initiated pledge deactivation

This commit is contained in:
Kelly Dwan 2019-12-09 10:52:50 -05:00
parent 7024cf3b2e
commit dbe5868a41
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
3 changed files with 49 additions and 11 deletions

View file

@ -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;