strangerstudios / convertkit-paid-memberships-pro

Integrate ConvertKit with Paid Memberships Pro. The plugin subscribes members with the assigned tag and also track purchase data for subscribers.
https://www.paidmembershipspro.com/add-ons/convertkit-integration/
GNU General Public License v2.0
2 stars 3 forks source link

Store Subscriber ID as Usermeta #7

Closed kimcoleman closed 2 years ago

kimcoleman commented 3 years ago

Is your feature request related to a problem? Please describe. In order to accurately update the subscriber information if the WordPress user profile updates, we need to know the ID of the subscriber in ConvertKit.

The tag a subscriber endpoint we use at membership checkout returns the ID of the newly added subscriber: https://developers.convertkit.com/#tag-a-subscriber

Describe the solution you'd like We should add a function to update usermeta when the API returns the data from ConvertKit with the Subscriber ID.

Additional context Doing this is a prerequisite for allowing profile update (email address) changes on the WP side to reflect in ConvertKit.

Note: In reading the ConvertKit API docs it doesn't look like there is a way to retroactively ping for the Subscriber ID. You can call all subscribers (https://developers.convertkit.com/#list-subscribers), so it is possible we could eventually write a one-time script to run and update usermeta with subscriber ID. Some would be unable to be updated though if the user email isn't a match.