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 */ public static function unschedule(): void { if ( ! function_exists( 'as_unschedule_all_actions' ) ) { return; } as_unschedule_all_actions( self::HOOK, [], 'activelayer' ); } }