HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/coolswim/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Retry/Trigger.php
<?php

namespace WPML\TM\ATE\Retry;

use WPML\WP\OptionManager;

class Trigger {
	const RETRY_TIMEOUT = 10 * MINUTE_IN_SECONDS;

	const OPTION_GROUP = 'WPML\TM\ATE\Retry';
	const RETRY_LAST = 'last';

	/**
	 * @return bool
	 */
	public function isRetryRequired() {
		$retrySync = OptionManager::getOr( 0, self::RETRY_LAST, self::OPTION_GROUP );

		return ( time() - self::RETRY_TIMEOUT ) > $retrySync;
	}

	public function setLastRetry( $time ) {
		OptionManager::updateWithoutAutoLoad( self::RETRY_LAST, self::OPTION_GROUP, $time );
	}
}