getUserPatronage defaults to current user even when passed a user object

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 .
image

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.

Also I just found this odd behaviour while testing the solution for the problem in the first post and I’d figure I’d just ask if it’s correct?

Using Patreon_Wordpress::isPatron($user) by itself causes the function to fail, but if I include Patreon_Wordpress::getUserPatronage($user) before it, it will succeed.

The code logic and sequence in there does not look like it will cause that behavior. However there is short term (for length of script run) internal caching of patronage. That may be interfering. Also any code or plugin that modifies user object or filters it may be interfering.