Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MenuItem doesn't apply graphql_resolve_menu_item filter in connectedNode like it does for connectedObject #2484

Closed
1 of 3 tasks
stephenchai opened this issue Aug 19, 2022 · 2 comments · Fixed by #3044
Closed
1 of 3 tasks
Labels
scope: API Issues related to access functions, actions, and filters Status: In Progress Type: Bug Something isn't working

Comments

@stephenchai
Copy link

Description

The filter doesn't fire as expected.

Steps to reproduce

  1. Add a graphql_resolve_menu_item with some debug code to see if it's being called.
  2. Query a menu.
  3. Note the debug code is not called.

Additional context

See Slack thread.

When looking at the MenuItem.php source, you can see the apply_filters is only called in the (deprecated) connectedObject

WPGraphQL Version

1.9.1

WordPress Version

6.0.1

PHP Version

7.4.30

Additional enviornment details

  • Gatsby / WP Gatsby
  • ACF Pro / ACF GraphQL latest
  • Yoast / Yoast GraphQL latest

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have disabled ALL plugins except for WPGraphQL.

  • Yes
  • My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
@justlevine
Copy link
Collaborator

The logic will need to be a little different, since connectedNode returns a connection, but the use case is the same.

return apply_filters(

@justlevine justlevine added Type: Bug Something isn't working scope: API Issues related to access functions, actions, and filters labels Sep 4, 2022
@stale
Copy link

stale bot commented Dec 4, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale? May need to be revalidated due to prolonged inactivity label Dec 4, 2022
@justlevine justlevine added Status: In Progress and removed Stale? May need to be revalidated due to prolonged inactivity labels Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: API Issues related to access functions, actions, and filters Status: In Progress Type: Bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants