Conversation
supportThere is 1 more is_checkout to change on line ~ 364 function 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. This topic was modified 2 hours, 35 minutes ago by neilgee .
No comments were stored for this source.