Skip to content

Commit

Permalink
Merge branch 'main' into 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
strygo committed Nov 30, 2023
2 parents d551c98 + f56670a commit 44274f6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 54 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @zlik @dabramovici @sol-loup @camcuz97 @agmurari @yang17 @nrostrow-meta @dalongi @palak-ana @n-nayak @singhramanpreett @luizmramosmeta @cristiannancumeta @singhalavi @jczhuoMeta @swinard-meta @strygo @fabik-meta @hsimsandhu

# These owners will be owning Catalog Directory, one would require to have
# approval for making catalog related changes
/app/code/Meta/Catalog/ @singhramanpreett @luizmramosmeta @cristiannancumeta @singhalavi @fabik-meta @ankurvjym @alexchertovmeta @somnotsam @danigirimeta @nanaasiedu
6 changes: 3 additions & 3 deletions app/code/Meta/BusinessExtension/Helper/FBEHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function getFBEExternalBusinessId($storeId)
*/
public function log($info, array $context = [])
{
if (!isset($context['log_type']) || !$this->systemConfig->isMetaTelemetryLoggingEnabled()) {
if (!isset($context['log_type'])) {
$this->logger->info($info);
return;
}
Expand Down Expand Up @@ -311,8 +311,8 @@ public function logException(Throwable $e, array $context = [])

public function logExceptionDetails($code, $message, $traceAsString, array $context = [])
{
// If the log type is not set or Meta extension logging is not enabled just log the error message and trace.
if (!isset($context['log_type']) || !$this->systemConfig->isMetaExceptionLoggingEnabled()) {
// If the log type is not set just log the error message and trace.
if (!isset($context['log_type'])) {
$this->logger->error($message);
$this->logger->error($traceAsString);
return;
Expand Down
37 changes: 0 additions & 37 deletions app/code/Meta/BusinessExtension/Model/System/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ class Config
private const XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_COMMERCE_EXTENSION_BASE_URL =
'facebook/internal/extension_base_url';

private const XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_META_EXCEPTION_LOGGING =
'facebook/business_extension/meta_exception_logging_enabled';
private const XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_META_TELEMETRY_LOGGING =
'facebook/business_extension/meta_telemetry_logging_enabled';

/**
* @var StoreManagerInterface
*/
Expand Down Expand Up @@ -978,38 +973,6 @@ public function getServerTestCode(int $scopeId = null, string $scope = null): ?s
);
}

/**
* Check if persisting exception logs to Meta is enabled
*
* @param int|null $scopeId
* @param string|null $scope
* @return string|null
*/
public function isMetaExceptionLoggingEnabled(int $scopeId = null, string $scope = null): ?string
{
return $this->getConfig(
self::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_META_EXCEPTION_LOGGING,
$scopeId,
$scope
);
}

/**
* Check if persisting telemetry logs to Meta is enabled
*
* @param int|null $scopeId
* @param string|null $scope
* @return string|null
*/
public function isMetaTelemetryLoggingEnabled(int $scopeId = null, string $scope = null): ?string
{
return $this->getConfig(
self::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_META_TELEMETRY_LOGGING,
$scopeId,
$scope
);
}

/**
* Get store weight unit
*
Expand Down
12 changes: 0 additions & 12 deletions app/code/Meta/BusinessExtension/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@
<config_path>facebook/business_extension/pixel_id</config_path>
<frontend_model>Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden</frontend_model>
</field>
<field id="meta_exception_logging_enabled" type="select" sortOrder="40" showInDefault="1"
showInWebsite="0" showInStore="1">
<config_path>facebook/business_extension/meta_exception_logging_enabled</config_path>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<frontend_model>Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden</frontend_model>
</field>
<field id="meta_telemetry_logging_enabled" type="select" sortOrder="50" showInDefault="1"
showInWebsite="0" showInStore="1">
<config_path>facebook/business_extension/meta_telemetry_logging_enabled</config_path>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<frontend_model>Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden</frontend_model>
</field>
<field id="installed" type="select" sortOrder="50" showInDefault="1"
showInWebsite="0" showInStore="1">
<config_path>facebook/business_extension/installed</config_path>
Expand Down
2 changes: 0 additions & 2 deletions app/code/Meta/BusinessExtension/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
<business_extension>
<active>1</active>
<onsite>0</onsite>
<meta_exception_logging_enabled>1</meta_exception_logging_enabled>
<meta_telemetry_logging_enabled>0</meta_telemetry_logging_enabled>
<client_access_token>195311308289826|52dcd04d6c7ed113121b5eb4be23b4a7</client_access_token>
</business_extension>
<catalog_management>
Expand Down

0 comments on commit 44274f6

Please sign in to comment.