File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1070,8 +1070,16 @@ public function daily_sync() {
10701070 if ( isset ( $ data ['extra_visits ' ] ) ) {
10711071 $ this ->settings ->update_frontend_banner_from_remote ( $ data ['extra_visits ' ] );
10721072 }
1073+
10731074 // Here the account got deactivated, in this case we check if the user is using offloaded images and we roll them back.
1074- if ( isset ( $ data ['status ' ] ) && $ data ['status ' ] === 'inactive ' ) {
1075+ $ should_revert_offloading = isset ( $ data ['status ' ] ) && $ data ['status ' ] === 'inactive ' ;
1076+
1077+ // The user is now on a plan without offloading and the grace period is over.
1078+ if ( isset ( $ data ['should_revert_offload ' ] ) && $ data ['should_revert_offload ' ] === true ) {
1079+ $ should_revert_offloading = true ;
1080+ }
1081+
1082+ if ( $ should_revert_offloading ) {
10751083 // We check if the user has images offloaded.
10761084 if ( $ this ->settings ->get ( 'offload_media ' ) === 'disabled ' ) {
10771085 return ;
You can’t perform that action at this time.
0 commit comments