Skip to content

Commit

Permalink
This fixes the term_link filter callback to not modify the term link …
Browse files Browse the repository at this point in the history
…urls for GraphQL requests.
  • Loading branch information
jasonbahl committed Nov 14, 2023
1 parent 77da190 commit e0bdb5f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/faustwp/includes/replacement/callbacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,10 @@ function post_link( $link ) {
* @return string
*/
function term_link( $term_link ) {
if ( ! is_rewrites_enabled() ) {
return $term_link;
}
if (
! is_rewrites_enabled()
|| ( function_exists( 'is_graphql_request' ) && is_graphql_request() )
) {

return equivalent_frontend_url( $term_link );
}
Expand Down

0 comments on commit e0bdb5f

Please sign in to comment.