From 37e442eb1e661f136718d71cfaf0c100a828c427 Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Fri, 14 Feb 2025 13:04:37 +0100
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Rename=20onboarding=20prop?=
=?UTF-8?q?=20to=20match=20its=20meaning?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/Data/OnboardingProfile.php | 20 +++++++++----------
.../src/Endpoint/OnboardingRestEndpoint.php | 10 +++++-----
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/modules/ppcp-settings/src/Data/OnboardingProfile.php b/modules/ppcp-settings/src/Data/OnboardingProfile.php
index 070d478c8..c0049921d 100644
--- a/modules/ppcp-settings/src/Data/OnboardingProfile.php
+++ b/modules/ppcp-settings/src/Data/OnboardingProfile.php
@@ -67,12 +67,12 @@ class OnboardingProfile extends AbstractDataModel {
*/
protected function get_defaults() : array {
return array(
- 'completed' => false,
- 'step' => 0,
- 'is_casual_seller' => null,
- 'are_optional_payment_methods_enabled' => null,
- 'products' => array(),
- 'setup_done' => false,
+ 'completed' => false,
+ 'step' => 0,
+ 'is_casual_seller' => null,
+ 'accept_card_payments' => null,
+ 'products' => array(),
+ 'setup_done' => false,
);
}
@@ -133,12 +133,12 @@ class OnboardingProfile extends AbstractDataModel {
}
/**
- * Sets the optional payment methods flag.
+ * Sets the "accept card payments" flag.
*
- * @param bool|null $are_optional_payment_methods_enabled Whether the PayPal optional payment methods are enabled.
+ * @param bool|null $accept_cards Whether to accept card payments via the PayPal plugin.
*/
- public function set_are_optional_payment_methods_enabled( ?bool $are_optional_payment_methods_enabled ) : void {
- $this->data['are_optional_payment_methods_enabled'] = $are_optional_payment_methods_enabled;
+ public function set_accept_card_payments( ?bool $accept_cards ) : void {
+ $this->data['accept_card_payments'] = $accept_cards;
}
/**
diff --git a/modules/ppcp-settings/src/Endpoint/OnboardingRestEndpoint.php b/modules/ppcp-settings/src/Endpoint/OnboardingRestEndpoint.php
index b055ab3e2..b7a5b8023 100644
--- a/modules/ppcp-settings/src/Endpoint/OnboardingRestEndpoint.php
+++ b/modules/ppcp-settings/src/Endpoint/OnboardingRestEndpoint.php
@@ -41,23 +41,23 @@ class OnboardingRestEndpoint extends RestEndpoint {
* @var array
*/
private array $field_map = array(
- 'completed' => array(
+ 'completed' => array(
'js_name' => 'completed',
'sanitize' => 'to_boolean',
),
- 'step' => array(
+ 'step' => array(
'js_name' => 'step',
'sanitize' => 'to_number',
),
- 'is_casual_seller' => array(
+ 'is_casual_seller' => array(
'js_name' => 'isCasualSeller',
'sanitize' => 'to_boolean',
),
- 'are_optional_payment_methods_enabled' => array(
+ 'accept_card_payments' => array(
'js_name' => 'areOptionalPaymentMethodsEnabled',
'sanitize' => 'to_boolean',
),
- 'products' => array(
+ 'products' => array(
'js_name' => 'products',
),
);