LLMS_Product::get_pricing_table_columns_count( bool $free_only = false )

Get the number of columns for the pricing table.

Parameters Parameters


(bool) (Optional) Only include free access plans if true. Default false.

Default value: false

Top ↑

Return Return


Top ↑

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;

			case 6:
				$cols = 3;

				$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 );

Top ↑

Changelog Changelog

Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.