WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WPCF7_RECAPTCHA::verify() public CF7 1.0

{} Это метод класса: WPCF7_RECAPTCHA{}

Хуки из метода
Возвращает

Null. Ничего.

Использование

$WPCF7_RECAPTCHA = new WPCF7_RECAPTCHA();
$WPCF7_RECAPTCHA->verify( $token );

Код WPCF7_RECAPTCHA::verify() CF7 5.3.2

<?php
public function verify( $token ) {
	$is_human = false;

	if ( empty( $token ) or ! $this->is_active() ) {
		return $is_human;
	}

	$endpoint = 'https://www.google.com/recaptcha/api/siteverify';

	$sitekey = $this->get_sitekey();
	$secret = $this->get_secret( $sitekey );

	$request = array(
		'body' => array(
			'secret' => $secret,
			'response' => $token,
		),
	);

	$response = wp_remote_post( esc_url_raw( $endpoint ), $request );

	if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
		if ( WP_DEBUG ) {
			$this->log( $endpoint, $request, $response );
		}

		return $is_human;
	}

	$response_body = wp_remote_retrieve_body( $response );
	$response_body = json_decode( $response_body, true );

	$this->last_score = $score = isset( $response_body['score'] )
		? $response_body['score']
		: 0;

	$threshold = $this->get_threshold();
	$is_human = $threshold < $score;

	$is_human = apply_filters( 'wpcf7_recaptcha_verify_response',
		$is_human, $response_body );

	if ( $submission = WPCF7_Submission::get_instance() ) {
		$submission->recaptcha = array(
			'version' => '3.0',
			'threshold' => $threshold,
			'response' => $response_body,
		);
	}

	return $is_human;
}