Usage_Reports::validate_rest_call( mixed $request )

validate_rest_call


Parameters Parameters

$request

(Required)


Top ↑

Return Return

(void)


Source Source

File: src/core/classes/class-usage-reports.php

	public function validate_rest_call( $request ) {

		$next_report = get_option( 'automator_next_report', 0 );

		parse_str( $request->get_body(), $result );

		if ( empty( $result['next_report'] ) ) {
			return false;
		}

		return $next_report == $result['next_report'];
	}