♻️ Use a shorter attribute name for send-only

This commit is contained in:
Philipp Stracker 2025-01-10 19:15:48 +01:00
parent 54e2258d62
commit 4fa6c78f83
No known key found for this signature in database
2 changed files with 19 additions and 19 deletions

View file

@ -53,8 +53,8 @@ class GeneralSettings extends AbstractDataModel {
$this->woo_settings['country'] = $country; $this->woo_settings['country'] = $country;
$this->woo_settings['currency'] = $currency; $this->woo_settings['currency'] = $currency;
$this->data['is_current_country_send_only'] = $is_send_only_country; $this->data['is_send_only_country'] = $is_send_only_country;
$this->data['merchant_connected'] = $this->is_merchant_connected(); $this->data['merchant_connected'] = $this->is_merchant_connected();
} }
/** /**
@ -64,17 +64,17 @@ class GeneralSettings extends AbstractDataModel {
*/ */
protected function get_defaults() : array { protected function get_defaults() : array {
return array( return array(
'use_sandbox' => false, // UI state, not a connection detail. 'use_sandbox' => false, // UI state, not a connection detail.
'use_manual_connection' => 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. 'is_send_only_country' => false, // Read-only flag.
// Details about connected merchant account. // Details about connected merchant account.
'merchant_connected' => false, 'merchant_connected' => false,
'sandbox_merchant' => false, 'sandbox_merchant' => false,
'merchant_id' => '', 'merchant_id' => '',
'merchant_email' => '', 'merchant_email' => '',
'client_id' => '', 'client_id' => '',
'client_secret' => '', 'client_secret' => '',
); );
} }

View file

@ -61,26 +61,26 @@ class CommonRestEndpoint extends RestEndpoint {
* @var array * @var array
*/ */
private array $merchant_info_map = array( private array $merchant_info_map = array(
'merchant_connected' => array( 'merchant_connected' => array(
'js_name' => 'isConnected', 'js_name' => 'isConnected',
), ),
'sandbox_merchant' => array( 'sandbox_merchant' => array(
'js_name' => 'isSandbox', 'js_name' => 'isSandbox',
), ),
'merchant_id' => array( 'merchant_id' => array(
'js_name' => 'id', 'js_name' => 'id',
), ),
'merchant_email' => array( 'merchant_email' => array(
'js_name' => 'email', 'js_name' => 'email',
), ),
'client_id' => array( 'client_id' => array(
'js_name' => 'clientId', 'js_name' => 'clientId',
), ),
'client_secret' => array( 'client_secret' => array(
'js_name' => 'clientSecret', 'js_name' => 'clientSecret',
), ),
'is_current_country_send_only' => array( 'is_send_only_country' => array(
'js_name' => 'isCurrentCountrySendOnly', 'js_name' => 'isSendOnlyCountry',
), ),
); );