Hello!
I’m trying to get the login user id using wp_get_current_user(), but it returns 0.
I enabled both syncs in vibeBP settings.
When I login with admin, I can see 1 returned from wp_get_current_user(), but with other login ids (logging-in not in the admin), it only returns 0.
Could you please help me? Thank you.
Well for that you will need to reload the page in order to detect the logged in user id as it needs the cookie to set , also in api calls you will not get the user id as api calls does not read cookies .
To read the user in api calls you will need the token .