LLMS_Product::get_pricing_table_columns_count( bool $free_only = false )
Get the number of columns for the pricing table.
Parameters Parameters
- $free_only
-
(bool) (Optional) Only include free access plans if true. Default
false
.Default value: false
Return Return
(int)
Source Source
File: includes/models/model.llms.product.php
public function get_pricing_table_columns_count( $free_only = false ) { $count = count( $this->get_access_plans( $free_only ) ); switch ( $count ) { case 0: $cols = 1; break; case 6: $cols = 3; break; default: $cols = $count; } /** * Filter the number of columns of the product's pricing table. * * @since 3.0.0 * * @param int $cols The number of columns of the pricing table for the `$product`. * @param LLMS_Product $product The LLMS_Product instance. * @param int $count The number of access plans related to the product `$product`. * @param bool $free_only Whether or not to include the free access plans only. */ return apply_filters( 'llms_get_product_pricing_table_columns_count', $cols, $this, $count, $free_only ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |