Skip to content

Instantly share code, notes, and snippets.

@shivapoudel
Created January 17, 2018 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shivapoudel/eb42c0a45e53630ba1a66dca786efb9f to your computer and use it in GitHub Desktop.
Save shivapoudel/eb42c0a45e53630ba1a66dca786efb9f to your computer and use it in GitHub Desktop.
WooCommerce - Enable REST API permissions check
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_filter( 'woocommerce_rest_check_permissions', '__return_true' );
@lacikawiz
Copy link

This actually disables the permission check. I just tried it. (And that's exactly what I needed - so thank you :)

It always returns true for the permission check, thus allows any request to be executed regardless of authentication or API key permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment