Replace dummy flag with real user choice

This commit is contained in:
Philipp Stracker 2025-02-14 13:06:33 +01:00
parent 37e442eb1e
commit 0e0a73db11
No known key found for this signature in database
2 changed files with 10 additions and 1 deletions

View file

@ -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.
*

View file

@ -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 );