# getUserPatronage seems broken

**URL:** <https://www.patreondevelopers.com/t/getuserpatronage-seems-broken/6297>\
**Category:** Wordpress Plugin\
**Created:** [October 8, 2022, 12:44pm UTC](https://www.patreondevelopers.com/t/getuserpatronage-seems-broken/6297 "2022-10-08T12:44:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrubimf](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/jrubimf/32/2122_2.png) [@jrubimf](https://www.patreondevelopers.com/u/jrubimf)\
**Post date:** [October 8, 2022, 12:44pm UTC](https://www.patreondevelopers.com/t/getuserpatronage-seems-broken/6297/1 "2022-10-08T12:44:52Z")

</div>

Patreon\_Wordpress::getUserPatronage($user);

Is not actually giving me the right result after and user resubbed.

Its odd, cause getUserPatronageDuration does return the right value.

2022-10-08T12:35:21+00:00 DEBUG Status: active  
2022-10-08T12:35:21+00:00 DEBUG User: patreon\_46668768  
2022-10-08T12:35:21+00:00 DEBUG User: 1623  
2022-10-08T12:35:21+00:00 DEBUG Pledge Start: 1662397299  
2022-10-08T12:35:21+00:00 DEBUG Patronage: 0  
2022-10-08T12:35:21+00:00 DEBUG Lifetime: 2189  
2022-10-08T12:35:21+00:00 DEBUG Patronage Duration: 32

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [October 10, 2022, 3:57pm UTC](https://www.patreondevelopers.com/t/getuserpatronage-seems-broken/6297/2 "2022-10-10T15:57:45Z")

</div>

What is the result it is giving versus the expected result? How long has it been after the user resubbed?

---

<div class="post-metadata">

**Author:** ![jrubimf](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/jrubimf/32/2122_2.png) [@jrubimf](https://www.patreondevelopers.com/u/jrubimf)\
**Post date:** [October 10, 2022, 4:38pm UTC](https://www.patreondevelopers.com/t/getuserpatronage-seems-broken/6297/3 "2022-10-10T16:38:54Z")

</div>

2022-10-10T12:24:09+00:00 DEBUG Status: active  
2022-10-10T12:24:09+00:00 DEBUG User: patreon\_74262442  
2022-10-10T12:24:09+00:00 DEBUG User: 1690  
2022-10-10T12:24:10+00:00 DEBUG Pledge Start: 1664712911  
2022-10-10T12:24:10+00:00 DEBUG Patronage: 2500  
2022-10-10T12:24:10+00:00 DEBUG Lifetime: 2500  
2022-10-10T12:24:10+00:00 DEBUG Patronage Duration: 8

Patronage should show the current patronage.

Found a way to reproduce this:  
When you disable Oauth only, created accounts with only Patreon will give me that behaviour.

---

<div class="post-metadata">

**Author:** ![jrubimf](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/jrubimf/32/2122_2.png) [@jrubimf](https://www.patreondevelopers.com/u/jrubimf)\
**Post date:** [October 11, 2022, 2:58pm UTC](https://www.patreondevelopers.com/t/getuserpatronage-seems-broken/6297/4 "2022-10-11T14:58:03Z")

</div>

Actually i dont know whats going on.

Can we get rate limited if i call $user\_patronage too much?

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [October 12, 2022, 3:21pm UTC](https://www.patreondevelopers.com/t/getuserpatronage-seems-broken/6297/5 "2022-10-12T15:21:53Z")

</div>

Not really, but if your host or infra has anything that caches calls (incoming,outgoing etc) this could happen easily.

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [October 12, 2022, 3:22pm UTC](https://www.patreondevelopers.com/t/getuserpatronage-seems-broken/6297/6 "2022-10-12T15:22:09Z")

</div>

Also check whether the connection of your site to Patreon is still active.
