Hi, the suggestion to use the below snippet does not work, the hcpatcha still shows when using this snippet
Using WP CODE SNIPPETS plugin to add, had no issues with 20+ other snippets apart from this not working?
/**
* Filter hCaptcha activation flag.
*
* @param bool $activate Activate flag.
*
* @return bool
*/
function my_hcap_activate( $activate ) {
$url = isset( $_SERVER['REQUEST_URI'] ) ?
filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_SANITIZE_FULL_SPECIAL_CHARS ) :
'';
if ( '/my-account/return-requests/' === $url ) {
return false;
}
return $activate;
}
add_filter( 'hcap_activate', 'my_hcap_activate' );