File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
app/code/Magento/CatalogGraphQl/Plugin/Product Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \CatalogGraphQl \Plugin \Product ;
9
9
10
- use Magento \Catalog \Api \ProductRepositoryInterface ;
11
10
use Magento \Catalog \Model \Product ;
12
11
use Magento \CatalogGraphQl \Model \Resolver \Cache \Product \MediaGallery \ResolverCacheIdentity ;
13
12
use Magento \Framework \Serialize \SerializerInterface ;
18
17
*/
19
18
class UpdateIdentities
20
19
{
21
- /**
22
- * @var ProductRepositoryInterface
23
- */
24
- private $ productRepository ;
25
-
26
20
/**
27
21
* @var SerializerInterface
28
22
*/
29
23
private $ serializer ;
30
24
31
25
/**
32
- * @param ProductRepositoryInterface $productRepository
33
26
* @param SerializerInterface $serializer
34
27
*/
35
28
public function __construct (
36
- ProductRepositoryInterface $ productRepository ,
37
29
SerializerInterface $ serializer
38
30
) {
39
- $ this ->productRepository = $ productRepository ;
40
31
$ this ->serializer = $ serializer ;
41
32
}
42
33
@@ -67,12 +58,7 @@ private function isMediaGalleryChanged(Product $product): bool
67
58
return false ;
68
59
}
69
60
70
- $ mediaGalleryImages = $ this ->productRepository ->get (
71
- $ product ->getSku (),
72
- false ,
73
- null ,
74
- true
75
- )->getMediaGallery ('images ' ) ?? [];
61
+ $ mediaGalleryImages = $ product ->getMediaGallery ('images ' ) ?? [];
76
62
77
63
$ origMediaGalleryImages = $ product ->getOrigData ('media_gallery ' )['images ' ] ?? [];
78
64
You can’t perform that action at this time.
0 commit comments