Commit b81c1eee authored by Michael Iseard's avatar Michael Iseard
Browse files

Tweak mollie settings migration

parent 15abe384
......@@ -119,21 +119,22 @@ class ActivatorService {
if ( version_compare( $old_version, '2.4.0', '<' ) ) {
$mollie = new MollieVendor();
// Setting now replaced by single 'vendor_mollie' setting
// Setting now replaced by single 'vendor_mollie' setting.
if(Settings::update_setting( 'vendor_mollie', [
'connected' => Settings::get_setting( 'mollie_connected' ),
'recurring' => $mollie->can_use_recurring(),
'mode' => Settings::get_setting('mollie_api_mode'),
'test_key' => Settings::get_setting( 'mollie_test_api_key' ),
'live_key' => Settings::get_setting( 'mollie_live_api_key' ),
])) {
// Remove old settings fields.
Settings::remove_setting( 'mollie_connected' );
Settings::remove_setting( 'mollie_recurring_enabled' );
Settings::remove_setting( 'mollie_api_mode' );
Settings::remove_setting( 'mollie_test_api_key' );
Settings::remove_setting( 'mollie_live_api_key' );
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment