Support » Plugin: Restricted Site Access » Allow REST requests

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Tung Du

    (@dinhtungdu)

    Hi @ayssono,

    You can use this snippet to exclude REST API instead.

    
    add_filter( 'restricted_site_access_is_restricted', function( $restricted, $wp ) {
        if ( ! empty( $wp->query_vars['rest_route'] ) ) {
            return false;
        }
    
    	return $restricted;
    }, 10, 2 );
    

    Hope this helps!

    Thread Starter ayssono

    (@ayssono)

    Hi!

    GREAT, works, thank you!

    Kind regards,

    Klaus 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Allow REST requests’ is closed to new replies.