Skip to content

Commit fcfe0bb

Browse files
authored
Allow order cancel() method to have a comment, like registerCancellation() (#1804)
1 parent 0775715 commit fcfe0bb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/code/core/Mage/Sales/Model/Order.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,15 +1248,14 @@ public function unhold()
12481248

12491249
/**
12501250
* Cancel order
1251-
*
1251+
* @param string $comment
12521252
* @return $this
12531253
*/
1254-
public function cancel()
1254+
public function cancel($comment = '')
12551255
{
12561256
if ($this->canCancel()) {
12571257
$this->getPayment()->cancel();
1258-
$this->registerCancellation();
1259-
1258+
$this->registerCancellation($comment);
12601259
Mage::dispatchEvent('order_cancel_after', array('order' => $this));
12611260
}
12621261

0 commit comments

Comments
 (0)