Created
October 25, 2023 04:31
-
-
Save hgati/4150b913d6a1a1d1293f10ef29b3c296 to your computer and use it in GitHub Desktop.
Magento2 DeleteOrders Patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 2c8ddf3534dc7b73b86bcf99117282723acf8a1d Mon Sep 17 00:00:00 2001 | |
From: Dennis <[email protected]> | |
Date: Wed, 25 Oct 2023 13:27:11 +0900 | |
Subject: [PATCH 1/2] Declare class property to fix issue in PHP 8.2 | |
--- | |
Console/Command/DeleteOrdersCommand.php | 15 +++++++++++++++ | |
Controller/Adminhtml/Deleteorders/MassDelete.php | 15 +++++++++++++++ | |
2 files changed, 30 insertions(+) | |
diff --git a/Console/Command/DeleteOrdersCommand.php b/Console/Command/DeleteOrdersCommand.php | |
index f363b3c..0fd92f9 100644 | |
--- a/Console/Command/DeleteOrdersCommand.php | |
+++ b/Console/Command/DeleteOrdersCommand.php | |
@@ -20,6 +20,21 @@ class DeleteOrdersCommand extends Command | |
{ | |
protected const ORDER_ID = 'increment_id'; | |
+ /** | |
+ * @var \Magento\Sales\Model\OrderFactory | |
+ */ | |
+ protected $orderFactory; | |
+ | |
+ /** | |
+ * @var \Magenizr\DeleteOrders\Model\Order | |
+ */ | |
+ protected $order; | |
+ | |
+ /** | |
+ * @var \Magenizr\DeleteOrders\Helper\Data | |
+ */ | |
+ protected $helper; | |
+ | |
/** | |
* Init constructor | |
* | |
diff --git a/Controller/Adminhtml/Deleteorders/MassDelete.php b/Controller/Adminhtml/Deleteorders/MassDelete.php | |
index 3f2cfb0..d3b7693 100755 | |
--- a/Controller/Adminhtml/Deleteorders/MassDelete.php | |
+++ b/Controller/Adminhtml/Deleteorders/MassDelete.php | |
@@ -13,6 +13,21 @@ use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection; | |
class MassDelete extends \Magento\Sales\Controller\Adminhtml\Order\AbstractMassAction | |
{ | |
+ /** | |
+ * @var \Magenizr\DeleteOrders\Helper\Data | |
+ */ | |
+ protected $helper; | |
+ | |
+ /** | |
+ * @var \Magenizr\DeleteOrders\Model\Order | |
+ */ | |
+ protected $order; | |
+ | |
+ /** | |
+ * @var \Magento\Sales\Model\OrderRepository | |
+ */ | |
+ protected $orderRepository; | |
+ | |
/** | |
* MassDelete constructor | |
* | |
-- | |
2.34.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment