llms_helper_get_available_add_ons( bool $installable_only = true )

Retrieve an array of addons that are available via currently active License Keys


Parameters Parameters

$installable_only

(bool) (Optional) If true, only includes installable addons, if false, includes non-installable addons (like bundles).

Default value: true


Top ↑

Return Return

(array)


Top ↑

Source Source

File: libraries/lifterlms-helper/includes/functions-llms-helper.php

function llms_helper_get_available_add_ons( $installable_only = true ) {

	$ids = array();
	foreach ( llms_helper_options()->get_license_keys() as $key ) {
		if ( 1 == $key['status'] ) {
			$ids = array_merge( $ids, $key['addons'] );
		}
		if ( false === $installable_only ) {
			$ids[] = $key['product_id'];
		}
	}

	return array_unique( $ids );

}


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.