File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
app/code/Meta/BusinessExtension Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ class Config
119
119
private const XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_COMMERCE_EXTENSION_BASE_URL =
120
120
'facebook/internal/extension_base_url ' ;
121
121
122
+ private const XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_DYNAMIC_CHECKOUT_APIS =
123
+ 'facebook/business_extension/dynamic_checkout_apis_enabled ' ;
124
+
122
125
/**
123
126
* @var StoreManagerInterface
124
127
*/
@@ -880,6 +883,22 @@ public function getAllOnsiteFBEInstalledStores()
880
883
});
881
884
}
882
885
886
+ /**
887
+ * Check if dynamic checkout apis are enabled
888
+ *
889
+ * @param int|null $scopeId
890
+ * @param string|null $scope
891
+ * @return string|null
892
+ */
893
+ public function areDynamicCheckoutApisEnabled (int $ scopeId = null , string $ scope = null ): ?string
894
+ {
895
+ return $ this ->getConfig (
896
+ self ::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_DYNAMIC_CHECKOUT_APIS ,
897
+ $ scopeId ,
898
+ $ scope
899
+ );
900
+ }
901
+
883
902
/**
884
903
* Get feed id
885
904
*
Original file line number Diff line number Diff line change 45
45
<config_path >facebook/business_extension/pixel_id</config_path >
46
46
<frontend_model >Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden</frontend_model >
47
47
</field >
48
+ <field id =" dynamic_checkout_apis_enabled" type =" select" sortOrder =" 40" showInDefault =" 1" showInWebsite =" 0"
49
+ showInStore =" 1" >
50
+ <config_path >facebook/business_extension/dynamic_checkout_apis_enabled</config_path >
51
+ <source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
52
+ <frontend_model >Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden</frontend_model >
53
+ </field >
48
54
<field id =" installed" type =" select" sortOrder =" 50" showInDefault =" 1"
49
55
showInWebsite =" 0" showInStore =" 1" >
50
56
<config_path >facebook/business_extension/installed</config_path >
Original file line number Diff line number Diff line change 6
6
<business_extension >
7
7
<active >1</active >
8
8
<onsite >0</onsite >
9
+ <dynamic_checkout_apis_enabled >0</dynamic_checkout_apis_enabled >
9
10
<client_access_token >195311308289826|52dcd04d6c7ed113121b5eb4be23b4a7</client_access_token >
10
11
</business_extension >
11
12
<catalog_management >
You can’t perform that action at this time.
0 commit comments