[REST API] Allow OPTIONS requests again

This commit is contained in:
Claudio Sanches 2017-07-13 15:19:17 -03:00
parent 940019f245
commit f37e066d97
1 changed files with 2 additions and 0 deletions

View File

@ -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 ) );