Skip to content

Commit

Permalink
- phpcs-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbahl committed Feb 22, 2024
1 parent c3808b4 commit 088a06b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/WPGraphQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,19 @@ static function ( $interfaces, $config, $type ) {
* Prevent WPML from redirecting within WPGraphQL requests
*
* @see https://github.com/wp-graphql/wp-graphql/issues/1626#issue-769089073
* @since @todo
* @since @todo
*/
add_filter( 'wpml_is_redirected', static function( bool $is_redirect ) {
if ( is_graphql_request() ) {
return false;
}
return $is_redirect;
});
add_filter(
'wpml_is_redirected',
static function ( bool $is_redirect ) {
if ( is_graphql_request() ) {
return false;
}
return $is_redirect;
},
10,
1
);
}

/**
Expand Down

0 comments on commit 088a06b

Please sign in to comment.