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

#69 - Backward Compatibility fixes for playing nice with WPGraphQL for WooCommerce #75

Conversation

jasonbahl
Copy link
Collaborator

No description provided.

@jasonbahl jasonbahl added the bug label Feb 14, 2020
@jasonbahl jasonbahl self-assigned this Feb 14, 2020
@jasonbahl jasonbahl merged commit 26f2c0c into wp-graphql:develop Feb 14, 2020
@@ -221,7 +222,7 @@ public static function get_user_jwt_secret( $user_id ) {
* If the request is not from the current_user or the current_user doesn't have the proper capabilities, don't return the secret
*/
$is_current_user = ( $user_id === get_current_user_id() ) ? true : false;
if ( ! $is_current_user || ! current_user_can( $capability ) ) {
if ( ! $is_current_user && ! current_user_can( $capability ) ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why you put && here @jasonbahl . Shouldn't it make sure to return null if either of those conditions is true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants