WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\BlockTypes

AbstractProductGrid::get_products_limit() protected WC 1.0

Works out the item limit based on rows and columns, or returns default.

{} It's a method of the class: AbstractProductGrid{}

No Hooks.

Return

Int.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_products_limit();

Code of AbstractProductGrid::get_products_limit() WC 5.6.0

protected function get_products_limit() {
	if ( isset( $this->attributes['rows'], $this->attributes['columns'] ) && ! empty( $this->attributes['rows'] ) ) {
		$this->attributes['limit'] = intval( $this->attributes['columns'] ) * intval( $this->attributes['rows'] );
	}
	return intval( $this->attributes['limit'] );
}