On update, set woocommerce_catalog_columns to old default of 4

This commit is contained in:
Mike Jolley 2018-01-31 12:33:30 +00:00
parent bbae2cd5ba
commit 33ec416214
1 changed files with 10 additions and 9 deletions

View File

@ -4,8 +4,6 @@
*
* Functions for updating data, used by the background updater.
*
* @author WooThemes
* @category Core
* @package WooCommerce/Functions
* @version 2.6.0
*/
@ -1500,6 +1498,9 @@ function wc_update_330_image_options() {
if ( ! empty( $old_single_size['width'] ) ) {
update_option( 'woocommerce_single_image_width', absint( $old_single_size['width'] ) );
}
// Update columns to 4 which was the old default.
add_option( 'woocommerce_catalog_columns', 4 );
}
/**
@ -1604,13 +1605,6 @@ function wc_update_330_product_stock_status() {
' ); // WPCS: db call ok, unprepared SQL ok, cache ok.
}
/**
* Update DB Version.
*/
function wc_update_330_db_version() {
WC_Install::update_db_version( '3.3.0' );
}
/**
* Clear addons page transients
*/
@ -1636,3 +1630,10 @@ function wc_update_330_set_paypal_sandbox_credentials() {
update_option( 'woocommerce_paypal_settings', $paypal_settings );
}
}
/**
* Update DB Version.
*/
function wc_update_330_db_version() {
WC_Install::update_db_version( '3.3.0' );
}