Automattic\WooCommerce\Blocks\BlockTypes
AbstractProductGrid::get_products_limit
Works out the item limit based on rows and columns, or returns default.
Method of the class: AbstractProductGrid{}
No Hooks.
Returns
Int.
Usage
// protected - for code of main (parent) or child class $result = $this->get_products_limit();
AbstractProductGrid::get_products_limit() AbstractProductGrid::get products limit code WC 10.7.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'] );
}