Skip to content

Commit

Permalink
ENGCOM-1892: Create ability to set is_visible_on_front to order statu…
Browse files Browse the repository at this point in the history
…s history comment #15637
  • Loading branch information
VladimirZaets authored Jun 21, 2018
2 parents b5e21b6 + 6f7f048 commit d4caf2f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/code/Magento/Sales/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,24 @@ public function addStatusToHistory($status, $comment = '', $isCustomerNotified =
* @param string $comment
* @param bool|string $status
* @return OrderStatusHistoryInterface
* @deprecated
* @see addCommentToStatusHistory
*/
public function addStatusHistoryComment($comment, $status = false)
{
return $this->addCommentToStatusHistory($comment, $status, false);
}

/**
* Add a comment to order status history
* Different or default status may be specified
*
* @param string $comment
* @param bool|string $status
* @param bool $isVisibleOnFront
* @return OrderStatusHistoryInterface
*/
public function addCommentToStatusHistory($comment, $status = false, $isVisibleOnFront = false)
{
if (false === $status) {
$status = $this->getStatus();
Expand All @@ -1024,6 +1040,8 @@ public function addStatusHistoryComment($comment, $status = false)
$comment
)->setEntityName(
$this->entityType
)->setIsVisibleOnFront(
$isVisibleOnFront
);
$this->addStatusHistory($history);
return $history;
Expand Down

0 comments on commit d4caf2f

Please sign in to comment.