diff --git a/includes/api/class-wc-rest-authentication.php b/includes/api/class-wc-rest-authentication.php index 135e51b559c..18ede05a25e 100644 --- a/includes/api/class-wc-rest-authentication.php +++ b/includes/api/class-wc-rest-authentication.php @@ -114,8 +114,6 @@ class WC_REST_Authentication { // Get user data. $user = $this->get_user_data_by_consumer_key( $consumer_key ); if ( empty( $user ) ) { - $wc_rest_authentication_error = new WP_Error( 'woocommerce_rest_authentication_error', __( 'Consumer Key is invalid.', 'woocommerce' ), array( 'status' => 401 ) ); - return false; }