File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -159,9 +159,19 @@ public static function add_user_mutation_input_fields() {
159
159
],
160
160
];
161
161
162
- register_graphql_fields ( 'RegisterUserInput ' , $ fields );
163
- register_graphql_fields ( 'CreateUserInput ' , $ fields );
164
- register_graphql_fields ( 'UpdateUserInput ' , $ fields );
162
+
163
+ $ mutations_to_add_fields_to = apply_filters ('graphql_jwt_auth_add_user_mutation_input_fields ' , [
164
+ 'RegisterUserInput ' ,
165
+ 'CreateUserInput ' ,
166
+ 'UpdateUserInput ' ,
167
+ ] );
168
+
169
+ if ( ! empty ( $ mutations_to_add_fields_to ) && is_array ( $ mutations_to_add_fields_to ) ) {
170
+ foreach ( $ mutations_to_add_fields_to as $ mutation ) {
171
+ register_graphql_fields ( $ mutation , $ fields );
172
+ }
173
+ }
174
+
165
175
}
166
176
167
177
/**
You can’t perform that action at this time.
0 commit comments