WordPress at a glance
function is not described

wc_get_default_product_rows_per_page() WC 3.3.0

Get the default rows setting - this is how many product rows will be shown in loops.

No Hooks.

Return

Int. Nothing.

Usage

wc_get_default_product_rows_per_page();

Changelog

Since 3.3.0 Introduced.

Code of wc_get_default_product_rows_per_page() WC 5.3.0

<?php
function wc_get_default_product_rows_per_page() {
	$rows         = absint( get_option( 'woocommerce_catalog_rows', 4 ) );
	$product_grid = wc_get_theme_support( 'product_grid' );
	$min_rows     = isset( $product_grid['min_rows'] ) ? absint( $product_grid['min_rows'] ) : 0;
	$max_rows     = isset( $product_grid['max_rows'] ) ? absint( $product_grid['max_rows'] ) : 0;

	if ( $min_rows && $rows < $min_rows ) {
		$rows = $min_rows;
		update_option( 'woocommerce_catalog_rows', $rows );
	} elseif ( $max_rows && $rows > $max_rows ) {
		$rows = $max_rows;
		update_option( 'woocommerce_catalog_rows', $rows );
	}

	return $rows;
}