“Contact form 7” bypass | WordPress.org

[ad_1]

I have used bypasses in the functions.php file before, but this time I am having trouble with a page that has a Contact form 7 form on it.
The page itself is bypasses, but the form is never submitted. Upon loading the page, this is showing in console:
Response { type: "basic", url: "https://redacted.com/wp-json/contact-form-7/v1/contact-forms/12345/feedback/schema", redirected: false, status: 401, ok: false, statusText: "Unauthorized", headers: Headers, body: ReadableStream, bodyUsed: false }

I have tried both of these to no help

function my_forcelogin_bypass( $bypass, $visited_url ) {
  // Allow dynamic URL
	  if ( is_page('/wp-json/contact-form-7/v1/contact-forms/12345/feedback/schema/') ) {
    $bypass = true;
  }
  $allowed = array(
	home_url( '/wp-json/contact-form-7/v1/contact-forms/12345/feedback/schema/' ),
    );
  if ( ! $bypass ) {
    $bypass = in_array( $visited_url, $allowed );
  }

  return $bypass;
}
add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass', 10, 2 );

Any ideas?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer