apply_filters( 'llms_get_product_access_plan_limit', int $limit, LLMS_Proudct $this )

Determine the number of access plans allowed on the product.


Description Description

This is a (somewhat) arbitrary limit chosen mostly based on the following 2 factors:

1) It looks visually unappealing to have a pricing table with 7+ items on it. 2) Having 7+ pricing plans creates a lot of decision fatigue for users.

If you disagree with either of these two factors you can quite easily change the limit using this filter.

Keep in mind that increasing the limit will likely require you to add CSS to accommodate 7+ plans on the automatically generated pricing tables.

Also, since plans are limited by the core to 6, we have no pagination built in for any queries that lookup or list access plans. This means that if you greatly increase the limit (say 200) you could very quickly run into issues where the default queries "do not scale" well. In which case you should first consider if you really need 200 plans and then start investigating other filters to add pagination (and probably caching) to these (now slow) queries.


Top ↑

Parameters Parameters

$limit

(int) Number of plans.

$this

(LLMS_Proudct) Product object.


Top ↑

Source Source

File: includes/models/model.llms.product.php

View on GitHub



Top ↑

Changelog 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.