Created
January 17, 2018 09:37
-
-
Save shivapoudel/eb42c0a45e53630ba1a66dca786efb9f to your computer and use it in GitHub Desktop.
WooCommerce - Enable REST API permissions check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not include this if already open! | |
/** | |
* Code goes in theme functions.php. | |
*/ | |
add_filter( 'woocommerce_rest_check_permissions', '__return_true' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.