You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/class-jwt-auth-schema-filters.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ public static function add_jwt_output_fields( $fields, $object, $type_registry )
61
61
'authToken' => [
62
62
'type' => $type_registry->get_type( 'String' ),
63
63
'description' => __( 'JWT Token that can be used in future requests for Authentication', 'wp-graphql-woocommerce' ),
64
-
'resolve' => function( $payload ) {
64
+
'resolve' => staticfunction( $payload ) {
65
65
$user = get_user_by( 'ID', $payload['id'] );
66
66
67
67
if ( ! $user ) {
@@ -85,7 +85,7 @@ public static function add_jwt_output_fields( $fields, $object, $type_registry )
85
85
'refreshToken' => [
86
86
'type' => $type_registry->get_type( 'String' ),
87
87
'description' => __( 'A JWT token that can be used in future requests to get a refreshed jwtAuthToken. If the refresh token used in a request is revoked or otherwise invalid, a valid Auth token will NOT be issued in the response headers.', 'wp-graphql-woocommerce' ),
88
-
'resolve' => function( $payload ) {
88
+
'resolve' => staticfunction( $payload ) {
89
89
$user = get_user_by( 'ID', $payload['id'] );
90
90
91
91
if ( ! $user ) {
@@ -124,7 +124,7 @@ public static function add_customer_to_login_payload() {
124
124
[
125
125
'type' => 'Customer',
126
126
'description' => __( 'Customer object of authenticated user.', 'wp-graphql-woocommerce' ),
127
-
'resolve' => function( $payload ) {
127
+
'resolve' => staticfunction( $payload ) {
128
128
$id = $payload['id'];
129
129
returnnewCustomer( $id );
130
130
},
@@ -138,7 +138,7 @@ public static function add_customer_to_login_payload() {
138
138
[
139
139
'type' => 'String',
140
140
'description' => __( 'A JWT token that can be used in future requests to for WooCommerce session identification', 'wp-graphql-woocommerce' ),
0 commit comments