Fix - wrong capabilites use on add order note issue fixed

This commit is contained in:
Alamgir 2020-07-01 10:14:22 +06:00
parent ca963af1b1
commit 5cda3967ff
1 changed files with 1 additions and 1 deletions

View File

@ -1688,7 +1688,7 @@ class WC_Order extends WC_Abstract_Order {
return 0;
}
if ( is_user_logged_in() && current_user_can( 'edit_shop_order', $this->get_id() ) && $added_by_user ) {
if ( is_user_logged_in() && current_user_can( 'edit_shop_orders', $this->get_id() ) && $added_by_user ) {
$user = get_user_by( 'id', get_current_user_id() );
$comment_author = $user->display_name;
$comment_author_email = $user->user_email;