src/Modules/Licenser.php
function check_for_update() {
		$update_data = get_transient( $this->product_key );

		if ( false === $update_data ) {
			$failed      = false;
			$update_data = $this->get_version_data();
			if ( empty( $update_data ) ) {
				$failed = true;
			}
			// If the response failed, try again in 30 minutes.
			if ( $failed ) {
				$data              = new \stdClass();
				$data->new_version = $this->product->get_version();
				set_transient( $this->product_key, $data, 30 * MINUTE_IN_SECONDS );

				return false;
			}
			$update_data->sections = maybe_unserialize( $update_data->sections );

			set_transient( $this->product_key, $update_data, 12 * HOUR_IN_SECONDS );
		}
		if ( ! isset( $update_data->new_version ) ) {
			return false;
		}
		if ( version_compare( $this->product->get_version(), $update_data->new_version, '>=' ) ) {
			return false;
		}

		return (array) $update_data;
	}
function check_for_update() {
		$update_data = get_transient( $this->product_key );

		if ( false === $update_data ) {
			$failed      = false;
			$update_data = $this->get_version_data();
			if ( empty( $update_data ) ) {
				$failed = true;
			}
			// If the response failed, try again in 30 minutes.
			if ( $failed ) {
				$data              = new \stdClass();
				$data->new_version = $this->product->get_version();
				set_transient( $this->product_key, $data, 30 * MINUTE_IN_SECONDS );

				return false;
			}
			$update_data->sections = maybe_unserialize( $update_data->sections );

			set_transient( $this->product_key, $update_data, 12 * HOUR_IN_SECONDS );
		}
		if ( ! isset( $update_data->new_version ) ) {
			return false;
		}
		if ( version_compare( $this->product->get_version(), $update_data->new_version, '>=' ) ) {
			return false;
		}

		return (array) $update_data;
	}
function check_for_update ( ) { $ update_data = get_transient ( $ this -> product_key ) ; if ( false === $ update_data ) { $ failed = false ; $ update_data = $ this -> get_version_data ( ) ; if ( empty ( $ update_data ) ) { $ failed = true ; } // If the response failed, try again in 30 minutes. if ( $ failed ) { $ data = new \ stdClass ( ) ; $ data -> new_version = $ this -> product -> get_version ( ) ; set_transient ( $ this -> product_key , $ data , 30 * MINUTE_IN_SECONDS ) ; return false ; } $ update_data -> sections = maybe_unserialize ( $ update_data -> sections ) ; set_transient ( $ this -> product_key , $ update_data , 12 * HOUR_IN_SECONDS ) ; } if ( ! isset ( $ update_data -> new_version ) ) { return false ; } if ( version_compare ( $ this -> product -> get_version ( ) , $ update_data -> new_version , '>=' ) ) { return false ; } return ( array ) $ update_data ; }
Check for updates

@return array|bool Either the update data or false in case of failure.
Check for updates