Additional plugin & connect with existing WP account


#1

Hey guys, we’re running a site with ultimatemember plugin (https://de.wordpress.org/plugins/ultimate-member/) and have existing accounts. Is it possible to create a link “Connect this account with patreon”?

On your documentations page (https://www.patreon.com/portal/how-to/build-on-wordpress) it says: “Developers can build additional plugins that work together with the official Patreon WordPress plugin. These can offer creators additional functionality.”

But how? I didn’t find any documentation about wp hooks (filters, actions). Should we use the PHP classes? Maybe you can provide the minimal information to accomplish this :slight_smile:

Thank you! Sebastian.


#2

Are you looking to just offer the ability for a user to log in to your site using their Patreon account (which will then create a local account) or do you want to be able to integrate Patreon functionality (i.e locking posts by reward) into your Wordpress website?

The Ultimate Member plugin offers a Social Login extension which doesn’t support Patreon but because Patreon uses the OAuth standard and LinkedIn etc. do too you could probably purchase that extension and then duplicate the LinkedIn functionality and modify it to support Patreon, but that’s only a good option if your use case is login only and you do not need to do things like restrict access to patrons.


#3

Documentation is in the works currently.

If you describe what you want to do, i can tell you which hooks and which functions you can use.

Possibly you would need to integrate it with ultimate member hooks too.


#4

Hi Sam, I want to restrict the access for patreons. But I thought it would be great if both ways are possible:

  1. Register/Login with standard ultimatemember forms -> Connect to patreon afterwards
  2. Register/Login with patreon -> Add user Email and Password afterwards with ultimatemember profile.

You know what I mean?


#5

Nice to hear that the documentation is in work.

Currently I’m using the functionality like this:

<?php
namespace My/Class;
use Patreon_Wordpress;
use Patreon_Frontend;
...
var_dump(Patreon_Frontend::patreonMakeLoginLink());
var_dump(Patreon_Frontend::isUserLoggedInPatreon());
....

Is this your considered way of doing it?`

Thank you, Sebastian


#6

That’s a good way of doing it, Sebastian.


#7

Sorry to resurrect an old thread, but I am pretty novice when it comes to PHP. I’m trying to do exactly the above; which file would I put it in, and where?

Thanks!!


#8

echo Patreon_Frontend::patreonMakeLoginLink();

will show the login link, and,

if(Patreon_Frontend::isUserLoggedInPatreon()) {

}

will check if user is logged into Patreon.

Anywhere you put them in in PHP code.