Revert columns to 4

This commit is contained in:
Mike Jolley 2018-01-31 17:55:17 +00:00
parent 33ec416214
commit 1f2046a3e3
3 changed files with 2 additions and 5 deletions

View File

@ -380,7 +380,7 @@ class WC_Shop_Customizer {
$wp_customize->add_setting(
'woocommerce_catalog_columns',
array(
'default' => 3,
'default' => 4,
'type' => 'option',
'capability' => 'manage_woocommerce',
'sanitize_callback' => 'absint',

View File

@ -306,7 +306,7 @@ function wc_product_cat_class( $class = '', $category = null ) {
* @return int
*/
function wc_get_default_products_per_row() {
$columns = get_option( 'woocommerce_catalog_columns', 3 );
$columns = get_option( 'woocommerce_catalog_columns', 4 );
$product_grid = wc_get_theme_support( 'product_grid' );
$min_columns = isset( $product_grid['min_columns'] ) ? absint( $product_grid['min_columns'] ) : 0;
$max_columns = isset( $product_grid['max_columns'] ) ? absint( $product_grid['max_columns'] ) : 0;

View File

@ -1498,9 +1498,6 @@ 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 );
}
/**