{"id":15928031,"date":"2022-08-18T12:36:48","date_gmt":"2022-08-18T12:36:48","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/contact-form-7-bypass\/"},"modified":"2022-08-18T12:36:48","modified_gmt":"2022-08-18T12:36:48","slug":"contact-form-7-bypass","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/contact-form-7-bypass\/","title":{"rendered":"&#8220;Contact form 7&#8221; bypass"},"content":{"rendered":"<p>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.<br \/>\nThe page itself is bypasses, but the form is never submitted. Upon loading the page, this is showing in console:<br \/>\n<code>Response { type: &quot;basic&quot;, url: &quot;https:\/\/redacted.com\/wp-json\/contact-form-7\/v1\/contact-forms\/12345\/feedback\/schema&quot;, redirected: false, status: 401, ok: false, statusText: &quot;Unauthorized&quot;, headers: Headers, body: ReadableStream, bodyUsed: false }<\/code><\/p>\n<p>I have tried both of these to no help<\/p>\n<pre><code>function my_forcelogin_bypass( $bypass, $visited_url ) {\n  \/\/ Allow dynamic URL\n\t  if ( is_page(&#039;\/wp-json\/contact-form-7\/v1\/contact-forms\/12345\/feedback\/schema\/&#039;) ) {\n    $bypass = true;\n  }<\/code><\/pre>\n<pre><code>  $allowed = array(\n\thome_url( &#039;\/wp-json\/contact-form-7\/v1\/contact-forms\/12345\/feedback\/schema\/&#039; ),\n    );\n  if ( ! $bypass ) {\n    $bypass = in_array( $visited_url, $allowed );\n  }\n\n  return $bypass;\n}\nadd_filter( &#039;v_forcelogin_bypass&#039;, &#039;my_forcelogin_bypass&#039;, 10, 2 );<\/code><\/pre>\n<p>Any ideas?<\/p>\n","protected":false},"template":"","class_list":["post-15928031","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15928031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15928031\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15928031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}