PMP fetch roles from discord and asign role to PMP based on that

[ad_1]

Plugin Support
Younes

(@vanbom)

Helo,
Thank you for reaching out. Currently, our plugin, Connect Paid Membership to Discord, is designed to assign Discord roles based on the user’s membership level in Paid Memberships Pro (PMP). However, the reverse functionality, where Discord roles are assigned based on roles in PMP, is not supported by our plugin and falls outside its scope.

If you’re looking to implement this functionality, you would need to build a custom solution using PHP. Unfortunately, we don’t have documentation on the functions specific to your needs within our plugin. However, you may consider exploring the Discord API documentation for guidance on how to check for roles on Discord and integrate them with Paid Memberships Pro.

Dear Younes,

Thank you for getting back to me.

I was trying to implement this but I need some info from Paid Membership Pro to Discord that I dont know how to get them. My sudo-algorithm is the following.

1) User registers through with Discord Auth.
2) Fetch the PMP user_id
3) From this user_id fetch user_info to check the discord name
4) Use discord API to find the assigned discord role
5) Make change on PMP user role based on discord role.

So I would need your assistance to retrieve that data for steps 2 and 3

Regards,
Panos Tzemis

Plugin Support
Younes

(@vanbom)

Though it is outside of scope we do, but you need to do custom version so any updates don’t remove your work,

You can hack into ‘ets_pmpro_discord_discord_api_callback’
The function that call after user get auth from discord

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer