LLMS_Access_Plan
LLMS_Access_Plan Model.
Description Description
Source Source
File: includes/models/model.llms.access.plan.php
Changelog Changelog
Version | Description |
---|---|
3.31.0 | The $check_availability parameter was added to the llms_plan_get_checkout_url filter. |
3.30.1 | Added method to get the initial price due on checkout. |
3.30.0 | Added checkout redirect properties and methods |
3.0.0 | Introduced. |
Methods Methods
- calculate_redirection_url — Calculate redirection url from settings
- can_expire — Determine if the access plan has expiration settings
- get_access_period_name — Get the translated and pluralized name of the plan's access period
- get_checkout_url — Retrieve the full URL to the checkout screen for the plan
- get_creation_args — Default arguments for creating a new post
- get_enroll_text — Retrieve the text displayed on "Buy" buttons Uses optional user submitted text and falls back to LifterLMS defaults if none is supplied
- get_expiration_details — Get a sentence explaining plan expiration details
- get_free_pricing_text — Get a string to use for 0 dollar amount prices rather than 0
- get_initial_price — Get the initial price due on checkout.
- get_price — Getter for price strings with optional formatting options
- get_price_with_coupon — Apply a coupon to a price
- get_product — Retrieve an instance of the associated LLMS_Product
- get_product_type — Retrieve the product type (course or membership) for the associated product
- get_redirection_url — Retrieve the full URL to redirect to after successful checkout
- get_schedule_details — Get a sentence explaining the plan's payment schedule
- get_trial_details — Get a sentence explaining the plan's trial offer
- get_visibility — Get the access plans visibility setting
- has_availability_restrictions — Determine if the plan has availability restrictions
- has_free_checkout — Determine if the free checkout process & interface should be used for this access plan
- has_trial — Determine if the plan has a trial offer One-time payments can't have a trial, so the plan must have a frequency greater than 0
- is_available_to_user — Determine if the plan is available to a user based on configured availability restrictions
- is_featured — Determine if the plan is marked as "featured"
- is_free — Determines if a plan is marked ar free This only returns the value of the setting and should not be used to check if payment is required (when using a coupon for example)
- is_on_sale — Determine if a plan is *currently* on sale
- is_recurring — Determine if the Access Plan has recurring payments
- is_visible — Determine if the plan is visible Both featured and visible access plans are considered visible
- requires_payment — Determine if the access plan requires payment.
- set_visibility — Update the visibility term for the access plan
- toArrayAfter — Cleanup data to remove unnecessary defaults
- toArrayCustom — Don't add custom fields during toArray()