Autoload woocommerce_allow_tracking option (#52512)
This commit is contained in:
parent
f8a2c9358f
commit
779e00ed02
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: tweak
|
||||||
|
|
||||||
|
Add autoloading for woocommerce_allow_tracking option
|
|
@ -354,7 +354,7 @@ class WC_Settings_Advanced extends WC_Settings_Page {
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'checkboxgroup' => 'start',
|
'checkboxgroup' => 'start',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'autoload' => false,
|
'autoload' => true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'sectionend',
|
'type' => 'sectionend',
|
||||||
|
|
|
@ -272,6 +272,7 @@ class WC_Install {
|
||||||
),
|
),
|
||||||
'9.5.0' => array(
|
'9.5.0' => array(
|
||||||
'wc_update_950_add_brands_enabled_option',
|
'wc_update_950_add_brands_enabled_option',
|
||||||
|
'wc_update_950_tracking_option_autoload',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -2927,3 +2927,13 @@ function wc_update_940_remove_help_panel_highlight_shown() {
|
||||||
function wc_update_950_add_brands_enabled_option() {
|
function wc_update_950_add_brands_enabled_option() {
|
||||||
add_option( 'wc_feature_woocommerce_brands_enabled', 'yes' );
|
add_option( 'wc_feature_woocommerce_brands_enabled', 'yes' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Autoloads woocommerce_allow_tracking option.
|
||||||
|
*/
|
||||||
|
function wc_update_950_tracking_option_autoload() {
|
||||||
|
$options = array(
|
||||||
|
'woocommerce_allow_tracking' => 'yes',
|
||||||
|
);
|
||||||
|
wp_set_option_autoload_values( $options );
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue