Change \WC_Order::add_order_note cap to edit_shop_order instead of manage_woocommerce

This commit is contained in:
Mike 2014-04-03 14:33:54 +02:00 committed by Mike Jolley
parent afc17dad40
commit 3fb15a4e78
1 changed files with 1 additions and 1 deletions

View File

@ -1243,7 +1243,7 @@ class WC_Order {
$is_customer_note = intval( $is_customer_note );
if ( is_user_logged_in() && current_user_can( 'manage_woocommerce' ) ) {
if ( is_user_logged_in() && current_user_can( 'edit_shop_order', $this->id ) ) {
$user = get_user_by( 'id', get_current_user_id() );
$comment_author = $user->display_name;
$comment_author_email = $user->user_email;