wc_reset_product_grid_settings()
Reset the product grid settings when a new theme is activated.
Description Description
Source Source
File: includes/wc-template-functions.php
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. }
Changelog Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |