Commit 44ce3884 authored by Michael Iseard's avatar Michael Iseard
Browse files

Remove unused settings

parent 7448919f
......@@ -152,18 +152,6 @@ class Settings {
],
'sanitize_callback' => [$this, 'recursive_sanitize_text_field']
],
'address_enabled' => [
'type' => 'boolean',
'show_in_rest' => true,
'default' => false,
'sanitize_callback' => 'rest_sanitize_boolean',
],
'address_required' => [
'type' => 'boolean',
'show_in_rest' => true,
'default' => true,
'sanitize_callback' => 'rest_sanitize_boolean',
],
'terms_link' => [
'type' => 'string',
'show_in_rest' => true,
......
......@@ -141,7 +141,7 @@ class ActivatorService {
}
if ( version_compare( $old_version, '2.4.1', '<' ) ) {
// Cast connected variable as boolean
// Cast connected variable as boolean.
$vendor_settings = Settings::get_setting('vendor_mollie');
$connected = ! empty( $vendor_settings['connected'] ) && $vendor_settings['connected'];
Settings::update_array('vendor_mollie', [
......@@ -150,10 +150,14 @@ class ActivatorService {
}
if ( version_compare( $old_version, '2.5.0', '<' ) ) {
// Add message field to transactions
// Add message field to transactions.
global $wpdb;
$transaction_table = TransactionEntity::get_table_name();
$wpdb->query( "ALTER TABLE $transaction_table ADD `message` VARCHAR(255)" );
// Remove unused settings.
Settings::remove_setting('address_enabled');
Settings::remove_setting('address_required');
}
}
......
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