Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
OrderCanInvoice.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
12 
17 {
21  private $express;
22 
28  public function __construct(Express $express)
29  {
30  $this->express = $express;
31  }
32 
41  public function afterCanInvoice(Order $order, bool $result): bool
42  {
43  if ($this->express->isOrderAuthorizationAllowed($order->getPayment())) {
44  return false;
45  }
46 
47  return $result;
48  }
49 }
$order
Definition: order.php:55
afterCanInvoice(Order $order, bool $result)