wpmem_recaptcha_score

Description

This is a filter hook that allows you to modify the spam score used by reCAPTCHA v3.

reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot). Based on the score, you can take variable action in the context of your site.

The default value used in the WP-Members plugin is 0.5. Use the filter to allow registrations with a lower value, or restrict to registrations with a higher value as needed.

More information from Google’s documentation for reCAPTCHA version 3.

Parameters

$score
(integer)(required) The score required to allow the captcha to pass (0.0 – 1.0). Use a lower value to allow more registrations, higher to restrict more registrations.

Example

[snippet slug=wpmem_recaptcha_score lang=php]

Changelog

  • Introduced in extension version 3.3.9

Source

wpmem_recaptcha_score is located in  /includes/class-wp-members-recaptcha.php

Leave a Reply