From f37e066d97f6fe32587f63549729daced7ba5900 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Thu, 13 Jul 2017 15:19:17 -0300 Subject: [PATCH] [REST API] Allow OPTIONS requests again --- includes/api/class-wc-rest-authentication.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/api/class-wc-rest-authentication.php b/includes/api/class-wc-rest-authentication.php index 138fbd68bb8..ae4e008474b 100644 --- a/includes/api/class-wc-rest-authentication.php +++ b/includes/api/class-wc-rest-authentication.php @@ -533,6 +533,8 @@ class WC_REST_Authentication { return new WP_Error( 'woocommerce_rest_authentication_error', __( 'The API key provided does not have write permissions.', 'woocommerce' ), array( 'status' => 401 ) ); } break; + case 'OPTIONS' : + return true; default : return new WP_Error( 'woocommerce_rest_authentication_error', __( 'Unknown request method.', 'woocommerce' ), array( 'status' => 401 ) );