Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter izakicreate

    (@izakicreate)

    Hi,

    I managed to resolve this another way, by adding a filter that gives the endpoint query var a value if present. Now you can check if that query var equals ‘true’ in the condition test.

    
    add_filter( 'request', 'set_my_endpoint_value' );
    function set_my_endpoint_value( $vars ) {
        if ( isset( $vars[ 'endpoint' ] ) ) {
            $vars[ 'endpoint' ] = 'true';
        }
        
        return $vars;
    }
    
Viewing 1 replies (of 1 total)