WordPress at Your Fingertips
function is not described

wc_reset_product_grid_settings() WC 3.3.0

Reset the product grid settings when a new theme is activated.

No Hooks.

Return

null. Nothing.

Usage

wc_reset_product_grid_settings();

Changelog

Since 3.3.0 Introduced.

Code of wc_reset_product_grid_settings() WC 5.6.0

function wc_reset_product_grid_settings() {
	$product_grid = wc_get_theme_support( 'product_grid' );

	if ( ! empty( $product_grid['default_rows'] ) ) {
		update_option( 'woocommerce_catalog_rows', absint( $product_grid['default_rows'] ) );
	}

	if ( ! empty( $product_grid['default_columns'] ) ) {
		update_option( 'woocommerce_catalog_columns', absint( $product_grid['default_columns'] ) );
	}

	wp_cache_flush(); // Flush any caches which could impact settings or templates.
}