From d7b5a21cf3dbd1923747be9302e3356b9f05ffbe Mon Sep 17 00:00:00 2001 From: Djalel Date: Sat, 21 Dec 2024 11:13:38 +0000 Subject: [PATCH] SMP-3031 : Fix apple pay check permissions --- src/Admin/Ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Admin/Ajax.php b/src/Admin/Ajax.php index e54c01e4..cc51d496 100644 --- a/src/Admin/Ajax.php +++ b/src/Admin/Ajax.php @@ -219,7 +219,7 @@ public function api_check_applepay_permissions(WP_REST_Request $request) { $account = $this->generic_get_account($request, ApplePay::ENABLE_ON_TEST_MODE); if ($account['httpResponse']['payment_methods']['apple_pay']['enabled']) { - if (in_array(strtr(get_site_url(), array("http://" => "", "https://" => "")), $account['httpResponse']['payment_methods']['apple_pay']['allowed_domain_names'])) { + if (in_array($_SERVER['HTTP_HOST'], $account['httpResponse']['payment_methods']['apple_pay']['allowed_domain_names'])) { wp_send_json_success(true); }