delete_older_than( $days ); if ( $deleted > 0 ) { Logger::log( "Cleanup deleted {$deleted} submissions older than {$days} days", [ 'deleted_count' => $deleted, 'retention_days' => $days, ] ); } } /** * Cancel the scheduled recurring cleanup action. * * @since 1.1.0 * @since 1.8.0 Include cleanup actions with missing or damaged groups. */ public static function unschedule(): void { if ( ! function_exists( 'as_unschedule_all_actions' ) ) { return; } as_unschedule_all_actions( self::HOOK ); } }