Closed (fixed)
Project:
Patreon
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2019 at 20:57 UTC
Updated:
17 Jan 2020 at 16:14 UTC
Jump to comment: Most recent
When linking an account with a Patreon, the PatreonBridge calls getRelatedRewards() to look up the titles of the tiers the user could potentially be subscribed to.
The problem is that the Patreon Bridge method getRelatedRewards() assumes that a Campaign result is being passed in, which has an array of relationships.rewards.data.
But, when calling that method via patreon_user_assign_roles(), we are passing in the user's Pledge, and the API Response for a Pledge resource includes the singular relationships.reward.data.
"relationships": {
"patron": ...<user>...
"reward": ...<reward>...
"creator": ...<user>...
"address": ...<address>...
}
Create a new API method getPledgeReward() and update patreon_user_assign_roles() to utilize it.
Review and test.
None.
New method getPledgeReward().
None.
| Comment | File | Size | Author |
|---|---|---|---|
| patreon-return-pledge-reward.patch | 2.4 KB | torgospizza |
Comments
Comment #2
torgospizzaMinor re-wording.
Comment #3
torgospizzaComment #5
mrdalesmith commentedCheers for the patch: I've committed into a new dev version of 7.2 to allow for testing.
Comment #6
mrdalesmith commented