APP_Listing_Addons
Listing Pricing Addons processing class
Package
Contents
Description Description
Registers and activates payments addons related to given listing type
register_addons() method is hooked the ‘after_setup_theme’ action and registers addons in the Addons module and Payments module as well. So, no need to register addons as the ‘items’ of Payments theme support.
Use _get_addons_raw() method to assign Addons to the given listing type if you’re extending this class, or use filter ‘appthemes_listing_{$type}_addons’ if you don’t.
Requires theme supports:
- app-payments
- app-addons
Methods Methods
- __construct — Construct Listing Addons module
- _decorate_current_plan — Decorates given plan.
- _decorate_plan — Decorates given plan.
- _get_addons_raw — Retrieves an array of all Addons associated with given post type
- _handle_expired — Triggers on addon expire.
- _validate_addons — Validates posted addons duration.
- activate_modules — Activates submodules
- get_addon — Creates new Addon object depending on given referenced object.
- get_addons — Retrieves array of Addons object associated with given post type.
- get_addons_types — Retrievs an array of addons types
- get_defaults — Retrieves module's options default values to be registered in Listing options object.
- register_addons — Registers Addons in the Addons and Payments modules