mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-05 02:15:45 +03:00
Contributors: Reset profile hours when pledge deactivated.
See https://github.com/WordPress/five-for-the-future/issues/169
This commit is contained in:
parent
834c62c0d0
commit
c6d7bbb7c1
6 changed files with 338 additions and 4 deletions
|
@ -387,6 +387,10 @@ function deactivate( $pledge_id, $notify = false, $reason = '' ) {
|
|||
|
||||
do_action( FiveForTheFuture\PREFIX . '_deactivated_pledge', $pledge_id, $notify, $reason, $result );
|
||||
|
||||
if ( ! is_wp_error( $result ) ) {
|
||||
Contributor\remove_pledge_contributors( $pledge_id );
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue