<?php
namespace ShopyPress\Hooks;
if ( ! defined( 'ABSPATH' ) ) exit;

class FilterCronSchedules implements IHook {
    const EVERY_MINUTE = 'shopypress_every_minute';

    static function register() {
        add_filter('cron_schedules', [self::class, 'on_cron_schedules']);
    }

    static function on_cron_schedules($schedules) {
        $schedules[self::EVERY_MINUTE] = [
            'interval' => 60,
            'display' => esc_html__('Every minute', 'synckube-products-sync-for-shopify')
        ];

        return $schedules;
    }
}
