Fix WP_User ID

This commit is contained in:
Mike Jolley 2019-06-13 15:14:05 +01:00
parent 0b770df6a4
commit 865bb6b615
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ class CustomerDownloads extends AbstractController {
return new \WP_Error( 'woocommerce_rest_customer_invalid', __( 'Resource does not exist.', 'woocommerce' ), array( 'status' => 404 ) );
}
if ( ! wc_rest_check_user_permissions( 'read', $customer->get_id() ) ) {
if ( ! wc_rest_check_user_permissions( 'read', $customer->ID ) ) {
return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) );
}