From 33ec416214668cc673520db665c3ecfe4b74e909 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 31 Jan 2018 12:33:30 +0000 Subject: [PATCH] On update, set woocommerce_catalog_columns to old default of 4 --- includes/wc-update-functions.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/includes/wc-update-functions.php b/includes/wc-update-functions.php index 1fdfe073933..d8e4f803dff 100644 --- a/includes/wc-update-functions.php +++ b/includes/wc-update-functions.php @@ -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' ); +}