eduditurbide
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Hi @vigrowth,
Did you solve the problem by changing only this line?
or the others below as well?foreach ( $endpoints as $endpoint ) { if ( '/stats' === substr( $endpoint['slug'], -6 ) ) { $request = new \WP_REST_Request( 'OPTIONS', $endpoint['path'] ); ...Thanks
This works for me!
If you’re adding the filter inside theme and the it doesn’t work, please create a small 1 file plugin and add your filter there.
It should fix the issue.add_filter( 'jwt_auth_default_whitelist', function ( $default_whitelist ) { // Modify the $default_whitelist here. return $default_whitelist; } );—–
<?php /** * Plugin Name: - * Description: - * Version: - * Author: - * Author - * License: - * * Text Domain: whitelist for Contact Form 7 * * @package . */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /*----------------------------------------------------------------------------*/ /** * JWT whitelist for Contact Form 7 */ add_filter( 'jwt_auth_default_whitelist', function ($whitelist) { $whitelist[] = '/wp-json/contact-form-7/'; return $whitelist; }, 10, 2 );
Viewing 2 replies - 1 through 2 (of 2 total)