File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
app/code/Meta/BusinessExtension Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -376,11 +376,6 @@ public function deleteConfigKeys()
376
376
$ response = [];
377
377
$ response ['success ' ] = false ;
378
378
try {
379
- $ connection = $ this ->resourceConnection ->getConnection ();
380
- $ facebook_config = $ this ->resourceConnection ->getTableName ('facebook_business_extension_config ' );
381
- $ sql = "DELETE FROM $ facebook_config WHERE config_key NOT LIKE 'permanent%' " ;
382
- $ connection ->query ($ sql );
383
-
384
379
$ this ->systemConfig ->deleteConfig (SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_EXTERNAL_BUSINESS_ID )
385
380
->deleteConfig (SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_PIXEL_ID )
386
381
->deleteConfig (SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_PIXEL_AAM_SETTINGS )
Original file line number Diff line number Diff line change 8
8
use Meta \BusinessExtension \Model \System \Config as SystemConfig ;
9
9
use Meta \BusinessExtension \Logger \Logger ;
10
10
use Magento \Store \Model \StoreManagerInterface ;
11
+ use Meta \BusinessExtension \Helper \FBEHelper ;
11
12
12
13
class UpdateConfigurations implements DataPatchInterface
13
14
{
@@ -34,6 +35,11 @@ class UpdateConfigurations implements DataPatchInterface
34
35
*/
35
36
private $ moduleDataSetup ;
36
37
38
+ /**
39
+ * @var FBEHelper
40
+ */
41
+ private $ FBEHelper ;
42
+
37
43
/**
38
44
* Constructor
39
45
*
@@ -46,12 +52,14 @@ public function __construct(
46
52
ModuleDataSetupInterface $ moduleDataSetup ,
47
53
SystemConfig $ config ,
48
54
StoreManagerInterface $ storeManager ,
49
- Logger $ logger
55
+ Logger $ logger ,
56
+ FBEHelper $ FBEHelper
50
57
) {
51
58
$ this ->config = $ config ;
52
59
$ this ->storeManager = $ storeManager ;
53
60
$ this ->logger = $ logger ;
54
61
$ this ->moduleDataSetup = $ moduleDataSetup ;
62
+ $ this ->FBEHelper = $ FBEHelper ;
55
63
}
56
64
57
65
/**
@@ -101,8 +109,8 @@ public function revert(): void
101
109
$ connection ->startSetup ();
102
110
103
111
$ connection ->dropTable (self ::OLD_CONFIG_TABLE_NAME );
104
- $ connection ->delete ('core_config_data ' , "path LIKE 'facebook/%' " );
105
112
113
+ $ this ->FBEHelper ->deleteConfigKeys ();
106
114
$ connection ->endSetup ();
107
115
}
108
116
You can’t perform that action at this time.
0 commit comments