mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
✨ Add a plugin-config method to the data manager
This commit is contained in:
parent
cda49d87e2
commit
6d11c8ef99
1 changed files with 13 additions and 0 deletions
|
@ -11,6 +11,7 @@ namespace WooCommerce\PayPalCommerce\Settings\Service;
|
||||||
|
|
||||||
use WooCommerce\PayPalCommerce\Settings\Data\AbstractDataModel;
|
use WooCommerce\PayPalCommerce\Settings\Data\AbstractDataModel;
|
||||||
use WooCommerce\PayPalCommerce\Settings\Data\OnboardingProfile;
|
use WooCommerce\PayPalCommerce\Settings\Data\OnboardingProfile;
|
||||||
|
use WooCommerce\PayPalCommerce\Settings\DTO\ConfigurationFlagsDTO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SettingsDataManager
|
* Class SettingsDataManager
|
||||||
|
@ -71,4 +72,16 @@ class SettingsDataManager {
|
||||||
// Clear any caches.
|
// Clear any caches.
|
||||||
wp_cache_flush();
|
wp_cache_flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies a default configuration to the plugin.
|
||||||
|
*
|
||||||
|
* @param ConfigurationFlagsDTO $flags The configuration flags.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function apply_configuration( ConfigurationFlagsDTO $flags ) : void {
|
||||||
|
// Onboarding stuff...
|
||||||
|
|
||||||
|
$this->onboarding_profile->set_setup_done( true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue