From 141f4f80d260ed9c2acb10687b2dc0e136fea4c7 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 7 Dec 2015 16:13:26 +1000 Subject: [PATCH] Use correct ::get function when we have a key --- lib/class-wp-rest-oauth1.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/class-wp-rest-oauth1.php b/lib/class-wp-rest-oauth1.php index c058546..4632788 100644 --- a/lib/class-wp-rest-oauth1.php +++ b/lib/class-wp-rest-oauth1.php @@ -562,7 +562,7 @@ public function generate_access_token( $oauth_consumer_key, $oauth_token, $oauth } $this->should_attempt = false; - $consumer = WP_REST_OAuth1_Client::get( $oauth_consumer_key ); + $consumer = WP_REST_OAuth1_Client::get_by_key( $oauth_consumer_key ); $this->should_attempt = true; if ( is_wp_error( $consumer ) ) {