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

Conflict with Pre-Orders for WooCommerce #770

Open
Shazamepool opened this issue Jul 12, 2023 · 0 comments
Open

Conflict with Pre-Orders for WooCommerce #770

Shazamepool opened this issue Jul 12, 2023 · 0 comments

Comments

@Shazamepool
Copy link

Describe the bug
When the Pre-Orders for WooCommerce plugin is activated, some requests from WooGraphql are no longer able to authenticate users using their authToken.

Queries for which authentication no longer works :
- GetCart
- GetCustomer

Queries for which authentication still works :
- GetViewer

To Reproduce

  1. Woographql and Pre-orders active on your site
  2. Get authToken from login request
  3. Pass the auToken as an authorization header in a getCustomer request.
  4. Check the ID returned by getCustomer if it's "guest" you've reproduced the bug.

Expected behavior
When an Authorization header is passed as a header, getCustomer and getCart requests should be able to retrieve the user's information.

Plugin Versions

  • WooGraphQL Version: 0.12.3
  • WPGraphQL Version: 1.14.6
  • WordPress Version: 6.1.3
  • WooCommerce Version: 7.4.1
  • Pre-Orders for WooCommerce Version: 1.2.12

Additional context
Login mutation :

mutation($email: String!, $password: String!) {
    login(input: {username: $email, password: $password}) {
        authToken
    }
}

GetCustomer Query :

header -> {Authorization: Bearer $authToken}
query {
  customer {
    id
    username
    databaseId
    sessionToken
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant