Skip to content

Commit 571bf69

Browse files
authored
Merge branch 'main' into ADO-313-capi-changes
2 parents 66cdcd8 + eb05201 commit 571bf69

File tree

62 files changed

+1113
-1140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1113
-1140
lines changed

app/code/Meta/BusinessExtension/Block/Adminhtml/Setup.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,6 @@ public function getAccessTokenAjaxRoute()
174174
return $this->fbeHelper->getUrl('fbeadmin/ajax/fbtoken');
175175
}
176176

177-
/**
178-
* Get profiles ajax route
179-
*
180-
* @return mixed
181-
*/
182-
public function getProfilesAjaxRoute()
183-
{
184-
return $this->fbeHelper->getUrl('fbeadmin/ajax/fbprofiles');
185-
}
186-
187177
/**
188178
* Get aam settings route
189179
*

app/code/Meta/BusinessExtension/Block/Adminhtml/System/Config/DeleteConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function getButtonHtml()
120120
*
121121
* @return mixed
122122
*/
123-
protected function getStoreId()
123+
public function getStoreId()
124124
{
125125
$storeId = $this->getRequest()->getParam('store');
126126
if ($storeId === null && $this->systemConfig->isSingleStoreMode()) {

app/code/Meta/BusinessExtension/Controller/Adminhtml/Ajax/Fbdeleteasset.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ private function deleteConfigKeys($storeId)
172172
->deleteConfig(SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_COMMERCE_ACCOUNT_ID, $storeId)
173173
->deleteConfig(SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_PIXEL_ID, $storeId)
174174
->deleteConfig(SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_PIXEL_AAM_SETTINGS, $storeId)
175-
->deleteConfig(SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_PROFILES, $storeId)
176175
->deleteConfig(SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_CATALOG_ID, $storeId)
177176
->deleteConfig(
178177
SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_COMMERCE_PARTNER_INTEGRATION_ID,

app/code/Meta/BusinessExtension/Controller/Adminhtml/Ajax/Fbprofiles.php

Lines changed: 0 additions & 85 deletions
This file was deleted.

app/code/Meta/BusinessExtension/Controller/Adminhtml/ApiKey/Index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ class Index extends Action
2929
/**
3030
* @var KeyGenerator
3131
*/
32-
protected $apiKeyGenerator;
32+
public $apiKeyGenerator;
3333

3434
/**
3535
* @var WriterInterface
3636
*/
37-
protected $configWriter;
37+
public $configWriter;
3838

3939
/**
4040
* @var LoggerInterface
4141
*/
42-
protected $logger;
42+
public $logger;
4343

4444
/**
4545
* Index constructor

app/code/Meta/BusinessExtension/Helper/GraphAPIAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class GraphAPIAdapter
5555
/**
5656
* @var string
5757
*/
58-
private $graphAPIVersion = 'v20.0';
58+
private $graphAPIVersion = 'v22.0';
5959

6060
/**
6161
* @var Client

app/code/Meta/BusinessExtension/Model/Api/CoreConfigFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CoreConfigFactory
2929
*
3030
* @var ObjectManagerInterface
3131
*/
32-
protected ObjectManagerInterface $objectManager;
32+
public ObjectManagerInterface $objectManager;
3333

3434
/**
3535
* @param ObjectManagerInterface $objectManager

app/code/Meta/BusinessExtension/Model/Api/CustomApiKey/ApiKeyService.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ class ApiKeyService
3333
/**
3434
* @var KeyGenerator
3535
*/
36-
protected $apiKeyGenerator;
36+
public $apiKeyGenerator;
3737

3838
/**
3939
* @var WriterInterface
4040
*/
41-
protected $configWriter;
41+
public $configWriter;
4242

4343
/**
4444
* @var ScopeConfigInterface
4545
*/
46-
protected $scopeConfig;
46+
public $scopeConfig;
4747

4848
/**
4949
* @var LoggerInterface
5050
*/
51-
protected $logger;
51+
public $logger;
5252

5353
/**
5454
* @param KeyGenerator $apiKeyGenerator

app/code/Meta/BusinessExtension/Model/Api/CustomApiKey/Authenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Authenticator
3131
/**
3232
* @var ScopeConfigInterface
3333
*/
34-
protected $scopeConfig;
34+
public $scopeConfig;
3535

3636
/**
3737
* @var Http

app/code/Meta/BusinessExtension/Model/MBEInstalls.php

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function save($response, $storeId)
134134
$data = $response[0];
135135
$catalogId = $data['catalog_id'] ?? '';
136136
$pixelId = $data['pixel_id'] ?? '';
137-
$onsite_eligible = $data['onsite_eligible'] ?? false;
137+
$onsite_eligible = filter_var($data['onsite_eligible'], FILTER_VALIDATE_BOOLEAN) ?? false;
138138
$commercePartnerIntegrationId = $data['commerce_partner_integration_id'] ?? '';
139139

140140
// we will update catalog config if catalog has been updated in Meta
@@ -147,11 +147,10 @@ public function save($response, $storeId)
147147
);
148148

149149
$this->savePixelId($pixelId, $storeId);
150-
$this->saveProfiles($data['profiles'] ?? '', $storeId);
151150
$this->savePages($data['pages'] ?? '', $storeId);
152151
$this->saveCatalogId($catalogId, $storeId);
153152
$this->saveCommercePartnerIntegrationId($commercePartnerIntegrationId, $storeId);
154-
$this->saveIsOnsiteEligible($onsite_eligible, $storeId);
153+
$this->saveIsOnsiteEligible($onsite_eligible, (int)$storeId);
155154
$this->saveMerchantSettingsId($data['commerce_merchant_settings_id'] ?? '', $storeId);
156155
$this->saveInstalledFeatures($data['installed_features'] ?? '', $storeId);
157156
$this->setInstalledFlag($storeId);
@@ -186,25 +185,6 @@ private function savePixelId($pixelId, $storeId)
186185
}
187186
}
188187

189-
/**
190-
* Save profiles
191-
*
192-
* @param array $profiles
193-
* @param int $storeId
194-
*/
195-
private function saveProfiles($profiles, $storeId)
196-
{
197-
if ($profiles) {
198-
$profiles = json_encode($profiles);
199-
$this->systemConfig->saveConfig(
200-
SystemConfig::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_PROFILES,
201-
$profiles,
202-
$storeId
203-
);
204-
$this->fbeHelper->log("Saved fbe_installs profiles --- {$profiles} for storeID: {$storeId}");
205-
}
206-
}
207-
208188
/**
209189
* Save pages
210190
*
@@ -285,7 +265,7 @@ public function saveCommercePartnerIntegrationId($commercePartnerIntegrationId,
285265
* @param int $storeId
286266
* @return $this
287267
*/
288-
public function saveIsOnsiteEligible(bool $onsite_eligible, int $storeId): MBEInstalls
268+
public function saveIsOnsiteEligible($onsite_eligible, $storeId): MBEInstalls
289269
{
290270
if ($onsite_eligible) {
291271
$this->fbeHelper->log(

0 commit comments

Comments
 (0)