Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-paypal
Plugin
OrderCanInvoice.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Paypal\Plugin
;
9
10
use
Magento\Paypal\Model\Adminhtml\Express
;
11
use
Magento\Sales\Model\Order
;
12
16
class
OrderCanInvoice
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
}
Magento\Sales\Model\Order
Definition:
Order.php:54
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Sales\Model\Order
$order
$order
Definition:
order.php:55
Magento\Paypal\Plugin
Definition:
OrderCanInvoice.php:8
Magento\Paypal\Plugin\OrderCanInvoice\afterCanInvoice
afterCanInvoice(Order $order, bool $result)
Definition:
OrderCanInvoice.php:41
Magento\Paypal\Model\Adminhtml\Express
Definition:
Express.php:41
Magento\Paypal\Plugin\OrderCanInvoice
Definition:
OrderCanInvoice.php:16
Magento\Paypal\Plugin\OrderCanInvoice\__construct
__construct(Express $express)
Definition:
OrderCanInvoice.php:28