Tribe__Events__Aggregator__Record__Abstract::get_retry_time()

Returns the record retry timestamp.


Return

(int|bool) Either the record retry timestamp or false if the record will not retry to import.


Top ↑

Source

File: src/Tribe/Aggregator/Record/Abstract.php

	public function get_retry_time() {
		$retry_interval = $this->get_retry_interval();

		if ( empty( $retry_interval ) ) {
			return false;
		}

		if ( ! $this->get_last_import_status( 'error', true ) ) {
			return false;
		}

		$last_attempt_time = strtotime( $this->last_child()->post->post_modified_gmt );
		$retry_time        = $last_attempt_time + (int) $retry_interval;

		if ( $retry_time < time() ) {
			$retry_time = false;
		}

		/**
		 * Filters the retry timestamp for a scheduled record.
		 *
		 * @since 4.6.15
		 *
		 * @param int $retry_time A timestamp.
		 * @param Tribe__Events__Aggregator__Record__Abstract $this
		 */
		return apply_filters( 'tribe_aggregator_scheduled_records_retry_interval', $retry_time, $this );
	}

Top ↑

Changelog

Changelog
Version Description
4.6.15 Introduced.