Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eri-trabiccolo/4b7790ba302f33d947b594d5bbc9f105 to your computer and use it in GitHub Desktop.
Save eri-trabiccolo/4b7790ba302f33d947b594d5bbc9f105 to your computer and use it in GitHub Desktop.
<?php // dont copy this to your functios.php file
/**
* Change the maximum number of access plans which can be created for a single course / membership
*
* @param int $cols The number of columns of the pricing table for the `$product`.
* @return int
*/
function my_llms_get_product_pricing_table_columns_count( $cols ) {
// Always organize pricing table in rows of 3 colums, when plans are more than 6.
return $cols > 6 ? 3 : $cols;
}
add_filter( 'llms_get_product_pricing_table_columns_count', 'my_llms_get_product_pricing_table_columns_count' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment