<?php
/**
 * Detection Schedule for ACR
 *
 * Defines the custom schedule interval for abandoned cart detection.
 *
 * @package EDD\Pro\CartRecovery\Cron\Schedules
 * @since   3.6.5
 */

namespace EDD\Pro\CartRecovery\Cron\Schedules;

use EDD\Cron\Schedules\Schedule;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore

/**
 * Detection Schedule Class
 *
 * Custom schedule for the abandoned cart detection heartbeat.
 *
 * @since 3.6.5
 */
class Detection extends Schedule {

	/**
	 * The schedule ID.
	 *
	 * @since 3.6.5
	 * @var string
	 */
	public $id = 'edd_acr_sched_detection';

	/**
	 * The interval in seconds.
	 *
	 * @var int
	 */
	public $interval = 5 * MINUTE_IN_SECONDS;

	/**
	 * Get the display name for the schedule.
	 *
	 * @since 3.6.5
	 *
	 * @return string The translatable display name.
	 */
	protected function get_display_name(): string {
		return __( 'EDD Cart Recovery Detection', 'easy-digital-downloads' );
	}
}
