mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
✨ Replace dummy flag with real user choice
This commit is contained in:
parent
37e442eb1e
commit
0e0a73db11
2 changed files with 10 additions and 1 deletions
|
@ -132,6 +132,15 @@ class OnboardingProfile extends AbstractDataModel {
|
|||
$this->data['is_casual_seller'] = $casual_seller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the merchant wants to accept card payments via the PayPal plugin.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function get_accept_card_payments() : bool {
|
||||
return (bool) $this->data['accept_card_payments'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the "accept card payments" flag.
|
||||
*
|
||||
|
|
|
@ -300,7 +300,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
// TODO: Dummy values, use real values!
|
||||
$flags->country_code = 'US';
|
||||
$flags->is_business_seller = true;
|
||||
$flags->use_card_payments = true;
|
||||
$flags->use_card_payments = $onboarding_profile->get_accept_card_payments();
|
||||
$flags->use_subscriptions = true;
|
||||
|
||||
$data_manager->set_defaults_for_new_merchant( $flags );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue