Dear Vasyl,
I could not get it to work using your URI access strategy.
For people running into the same problem as me:
As an alternative or temporary route you can add the following code to your functions.php file. Thus redirecting the shop page to another page on which you put your ‘no access’ text.
function custom_redirect() {
if( (is_shop() || is_product() || is_product_category() ) && ! is_user_logged_in() ) {
wp_redirect( site_url( '/ name of page with no access message ' ) );
exit();
}
}
add_action("tempate_redirect","custom_redirect");