Skip to content

Commit 8aea8ca

Browse files
authored
Create ability to set is_visible_on_front to order status history comment
1 parent 1ce8c0a commit 8aea8ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/Sales/Model/Order.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ public function addStatusToHistory($status, $comment = '', $isCustomerNotified =
10091009
* @param bool|string $status
10101010
* @return OrderStatusHistoryInterface
10111011
*/
1012-
public function addStatusHistoryComment($comment, $status = false)
1012+
public function addStatusHistoryComment($comment, $status = false, $isVisibleOnFront = false)
10131013
{
10141014
if (false === $status) {
10151015
$status = $this->getStatus();
@@ -1024,6 +1024,8 @@ public function addStatusHistoryComment($comment, $status = false)
10241024
$comment
10251025
)->setEntityName(
10261026
$this->entityType
1027+
)->setIsVisibleOnFront(
1028+
$isVisibleOnFront
10271029
);
10281030
$this->addStatusHistory($history);
10291031
return $history;

0 commit comments

Comments
 (0)