Check user logged in from outside of WP folder
If user is logged in to site/subsite, and you check this function:
require(__DIR__./wp-load.php);
var_dump(is_user_logged_in());
it returns true. However, if called from outside folder:
require(__DIR__./subfolder/wp-load.php);
var_dump(is_user_logged_in());
It doesn't recognize authorization. What are the acceptable ways to achieve that, without using REST-API? (I doubt it just needs pointing some sub-directory for cookie).
Topic authorization wp-load.php Wordpress
Category Web