I’m finding that getUserPatronage seems to be ignoring my user object I’m passing it and defaulting to the current logged-in user which is causing troubles.
Here is what I have:
My function is passed $userID, it displays an image based on user’s patronage.
I get the WP_User object by: $user = get_user_by(‘ID’,$userID);
which successfully returns me the WP_User .
However, upon doing this:
$currentPledge = Patreon_Wordpress::getUserPatronage($user);
It ignores the user that was passed and defaults to the current user.
I know this is happening because upon checking $currentPledge, it displays the image for the CURRENT user’s patronage, NOT the user that was passed.
I am using a Multisite and all my users are in a specific blog ID, which I thought was the issue at first, but even using my usual tactic of swtching the blog ID to the main one still makes it have the current user’s info and not the one passed.