mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
♻️ Rename onboarding prop to match its meaning
This commit is contained in:
parent
f958696c5f
commit
37e442eb1e
2 changed files with 15 additions and 15 deletions
|
@ -70,7 +70,7 @@ class OnboardingProfile extends AbstractDataModel {
|
|||
'completed' => false,
|
||||
'step' => 0,
|
||||
'is_casual_seller' => null,
|
||||
'are_optional_payment_methods_enabled' => 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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,7 +53,7 @@ class OnboardingRestEndpoint extends RestEndpoint {
|
|||
'js_name' => 'isCasualSeller',
|
||||
'sanitize' => 'to_boolean',
|
||||
),
|
||||
'are_optional_payment_methods_enabled' => array(
|
||||
'accept_card_payments' => array(
|
||||
'js_name' => 'areOptionalPaymentMethodsEnabled',
|
||||
'sanitize' => 'to_boolean',
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue