10
10
use Magento \Sales \Model \Order \ShippingAssignmentBuilder ;
11
11
use Magento \Sales \Api \Data \OrderSearchResultInterfaceFactory as SearchResultFactory ;
12
12
use Magento \Sales \Api \Data \OrderExtensionInterface ;
13
- use Magento \Sales \Api \Data \OrderExtension ;
13
+ use Magento \Sales \Api \Data \OrderExtensionFactory ;
14
14
use Magento \Sales \Api \Data \OrderInterface ;
15
15
use Magento \Sales \Api \Data \ShippingAssignmentInterface ;
16
16
use Magento \Framework \Exception \NoSuchEntityException ;
@@ -34,9 +34,9 @@ class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface
34
34
protected $ searchResultFactory = null ;
35
35
36
36
/**
37
- * @var OrderExtension
37
+ * @var OrderExtensionFactory
38
38
*/
39
- private $ orderExtension ;
39
+ private $ orderExtensionFactory ;
40
40
41
41
/**
42
42
* @var ShippingAssignmentBuilder
@@ -173,7 +173,7 @@ private function setShippingAssignments(OrderInterface $order)
173
173
$ extensionAttributes = $ order ->getExtensionAttributes ();
174
174
175
175
if ($ extensionAttributes === null ) {
176
- $ extensionAttributes = $ this ->getOrderExtensionDependency ()->create ();
176
+ $ extensionAttributes = $ this ->getOrderExtensionDependencyFactory ()->create ();
177
177
} elseif ($ extensionAttributes ->getShippingAssignments () !== null ) {
178
178
return ;
179
179
}
@@ -189,14 +189,14 @@ private function setShippingAssignments(OrderInterface $order)
189
189
* @return OrderExtension
190
190
* @deprecated
191
191
*/
192
- private function getOrderExtensionDependency ()
192
+ private function getOrderExtensionDependencyFactory ()
193
193
{
194
- if (!$ this ->orderExtension instanceof OrderExtension ) {
195
- $ this ->orderExtension = \Magento \Framework \App \ObjectManager::getInstance ()->get (
194
+ if (!$ this ->orderExtensionFactory instanceof OrderExtensionFactory ) {
195
+ $ this ->orderExtensionFactory = \Magento \Framework \App \ObjectManager::getInstance ()->get (
196
196
'\Magento\Sales\Api\Data\OrderExtensionFactory '
197
197
);
198
198
}
199
- return $ this ->orderExtension ;
199
+ return $ this ->orderExtensionFactory ;
200
200
}
201
201
202
202
/**
0 commit comments