LLMS_Coupon
LLMS_Coupon model.
Description Description
Source Source
File: includes/models/model.llms.coupon.php
Changelog Changelog
Version | Description |
---|---|
3.24.0 | Unknown. |
3.0.0 | Introduced. |
Methods Methods
- applies_to_plan — Determine if the coupon can be applied to an access plan
- applies_to_product — Determine if a coupon can be applied to a specific product
- get_expiration_time — Retrieve the timestamp of a coupon expiration date Transforms the expiration date to a timestamp and adds 23 hours 59 minutes and 59 seconds to the date Coupons expire end of day on the expiration date (EG: 2015-12-01 @ 23:59:59)
- get_formatted_amount — Get the formatted coupon amount with currency symbol and/or percentage symbol
- get_formatted_discount_type — Get the discount type for human reading and allow translation
- get_products — Get an array of all products the coupon can be used with Combines $this->coupon_courses & $this->coupon_membership
- get_remaining_uses — Get the number of remaining uses calculated by subtracting # of uses from the usage limit
- get_uses — Get the number of times the coupon has been used
- has_main_discount — Determine if the main (non-trial) price is discounted by this coupon
- has_remaining_uses — Determine if a coupon has uses remaining
- has_trial_discount — Determine if trial amount discount is enabled for the coupon
- is_expired — Determine if a coupon is expired
- is_valid — Perform all available validations and return a success or error message