wp-graphql-woocommerce
wp-graphql-woocommerce copied to clipboard
Conflict with Pre-Orders for WooCommerce
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
- Woographql and Pre-orders active on your site
- Get authToken from login request
- Pass the auToken as an authorization header in a getCustomer request.
- 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
}
}