27
27
use Magento \Framework \App \ProductMetadata as FrameworkProductMetaData ;
28
28
use Magento \Framework \App \ResourceConnection ;
29
29
use Magento \Framework \HTTP \Client \Curl ;
30
- use Magento \Framework \Module \ModuleListInterface ;
31
30
use Magento \Framework \ObjectManagerInterface ;
32
31
use Magento \Framework \UrlInterface ;
33
32
use Meta \BusinessExtension \Model \System \Config as SystemConfig ;
@@ -75,11 +74,6 @@ class FBEHelper extends AbstractHelper
75
74
*/
76
75
private $ resourceConnection ;
77
76
78
- /**
79
- * @var ModuleListInterface
80
- */
81
- private $ moduleList ;
82
-
83
77
/**
84
78
* @var SystemConfig
85
79
*/
@@ -99,7 +93,6 @@ class FBEHelper extends AbstractHelper
99
93
* @param StoreManagerInterface $storeManager
100
94
* @param Curl $curl
101
95
* @param ResourceConnection $resourceConnection
102
- * @param ModuleListInterface $moduleList
103
96
* @param SystemConfig $systemConfig
104
97
* @param ProductMetadataInterface $productMetadata
105
98
*/
@@ -110,7 +103,6 @@ public function __construct(
110
103
StoreManagerInterface $ storeManager ,
111
104
Curl $ curl ,
112
105
ResourceConnection $ resourceConnection ,
113
- ModuleListInterface $ moduleList ,
114
106
SystemConfig $ systemConfig ,
115
107
ProductMetadataInterface $ productMetadata
116
108
) {
@@ -120,7 +112,6 @@ public function __construct(
120
112
$ this ->logger = $ logger ;
121
113
$ this ->curl = $ curl ;
122
114
$ this ->resourceConnection = $ resourceConnection ;
123
- $ this ->moduleList = $ moduleList ;
124
115
$ this ->systemConfig = $ systemConfig ;
125
116
$ this ->productMetadata = $ productMetadata ;
126
117
}
@@ -142,7 +133,7 @@ public function getMagentoVersion(): string
142
133
*/
143
134
public function getPluginVersion ()
144
135
{
145
- return $ this ->moduleList -> getOne ( self :: MODULE_NAME )[ ' setup_version ' ] ;
136
+ return $ this ->systemConfig -> getModuleVersion () ;
146
137
}
147
138
148
139
/**
@@ -152,7 +143,8 @@ public function getPluginVersion()
152
143
*/
153
144
public function getSource (): string
154
145
{
155
- return $ this ->productMetadata ->getEdition () == FrameworkProductMetaData::EDITION_NAME ? 'magento_opensource ' : 'adobe_commerce ' ;
146
+ return $ this ->productMetadata ->getEdition () == FrameworkProductMetaData::EDITION_NAME
147
+ ? 'magento_opensource ' : 'adobe_commerce ' ;
156
148
}
157
149
158
150
/**
@@ -448,7 +440,6 @@ public function deleteConfigKeys($storeId)
448
440
return $ this ;
449
441
}
450
442
451
-
452
443
/**
453
444
* Is updated version
454
445
*
0 commit comments