One more is_checkout
-
There is 1 more is_checkout to change
on line ~ 364function cfturnstile_woo_register_check($username, $email, $validation_errors) {
if(defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST) { return; } // Skip XMLRPC
if(defined( 'REST_REQUEST' ) && REST_REQUEST) { return; } // Skip REST API
if(!is_checkout()) {
$check = cfturnstile_check();
$success = $check['success'];
if($success != true) {
$validation_errors->add( 'cfturnstile_error', cfturnstile_failed_message() );
}
}
}if(!function_exists('is_checkout') || !is_checkout()) {That way if WooCommerce hasn’t loaded yet, it skips the
is_checkout()call entirely and just runs the Turnstile check — which is the safe fallback behaviour anyway since it’s not a checkout context.
You must be logged in to reply to this topic.