WP-API / OAuth2

Connect applications to your WordPress site without ever giving away your password.
GNU General Public License v2.0
172 stars 42 forks source link

Getting the consumer from within a plugin. #57

Closed kosso closed 5 years ago

kosso commented 5 years ago

HI, When using the older WP-API/OAuth1 plugin, to get the consumer from within my plugin, I could use $consumer = WP_REST_OAuth1_Client::get( $id );

What is the equivalent for this newer WP-API/OAuth2 plugin?

Thanks.

rmccue commented 5 years ago

You can use $client = WP\OAuth2\get_client( $id ) for this.