From 4fa6c78f83aa359c84c9925cd1be0bb8787514f8 Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Fri, 10 Jan 2025 19:15:48 +0100
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Use=20a=20shorter=20attrib?=
=?UTF-8?q?ute=20name=20for=20send-only?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/Data/GeneralSettings.php | 22 +++++++++----------
.../src/Endpoint/CommonRestEndpoint.php | 16 +++++++-------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/modules/ppcp-settings/src/Data/GeneralSettings.php b/modules/ppcp-settings/src/Data/GeneralSettings.php
index 8970c6c05..94e8a380f 100644
--- a/modules/ppcp-settings/src/Data/GeneralSettings.php
+++ b/modules/ppcp-settings/src/Data/GeneralSettings.php
@@ -53,8 +53,8 @@ class GeneralSettings extends AbstractDataModel {
$this->woo_settings['country'] = $country;
$this->woo_settings['currency'] = $currency;
- $this->data['is_current_country_send_only'] = $is_send_only_country;
- $this->data['merchant_connected'] = $this->is_merchant_connected();
+ $this->data['is_send_only_country'] = $is_send_only_country;
+ $this->data['merchant_connected'] = $this->is_merchant_connected();
}
/**
@@ -64,17 +64,17 @@ class GeneralSettings extends AbstractDataModel {
*/
protected function get_defaults() : array {
return array(
- 'use_sandbox' => false, // UI state, not a connection detail.
- 'use_manual_connection' => false, // UI state, not a connection detail.
- 'is_current_country_send_only' => false, // Read-only flag.
+ 'use_sandbox' => false, // UI state, not a connection detail.
+ 'use_manual_connection' => false, // UI state, not a connection detail.
+ 'is_send_only_country' => false, // Read-only flag.
// Details about connected merchant account.
- 'merchant_connected' => false,
- 'sandbox_merchant' => false,
- 'merchant_id' => '',
- 'merchant_email' => '',
- 'client_id' => '',
- 'client_secret' => '',
+ 'merchant_connected' => false,
+ 'sandbox_merchant' => false,
+ 'merchant_id' => '',
+ 'merchant_email' => '',
+ 'client_id' => '',
+ 'client_secret' => '',
);
}
diff --git a/modules/ppcp-settings/src/Endpoint/CommonRestEndpoint.php b/modules/ppcp-settings/src/Endpoint/CommonRestEndpoint.php
index 589e0ea01..d99204c80 100644
--- a/modules/ppcp-settings/src/Endpoint/CommonRestEndpoint.php
+++ b/modules/ppcp-settings/src/Endpoint/CommonRestEndpoint.php
@@ -61,26 +61,26 @@ class CommonRestEndpoint extends RestEndpoint {
* @var array
*/
private array $merchant_info_map = array(
- 'merchant_connected' => array(
+ 'merchant_connected' => array(
'js_name' => 'isConnected',
),
- 'sandbox_merchant' => array(
+ 'sandbox_merchant' => array(
'js_name' => 'isSandbox',
),
- 'merchant_id' => array(
+ 'merchant_id' => array(
'js_name' => 'id',
),
- 'merchant_email' => array(
+ 'merchant_email' => array(
'js_name' => 'email',
),
- 'client_id' => array(
+ 'client_id' => array(
'js_name' => 'clientId',
),
- 'client_secret' => array(
+ 'client_secret' => array(
'js_name' => 'clientSecret',
),
- 'is_current_country_send_only' => array(
- 'js_name' => 'isCurrentCountrySendOnly',
+ 'is_send_only_country' => array(
+ 'js_name' => 'isSendOnlyCountry',
),
);