llms_get_add_ons( $use_cache = true )

Retrieve available products from the LifterLMS.com API


Description Description


Return Return

(array)


Top ↑

Source Source

File: includes/admin/llms.functions.admin.php

function llms_get_add_ons( $use_cache = true ) {

	$data = false;
	if ( $use_cache ) {
		$data = get_transient( 'llms_products_api_result' );
	}

	if ( false === $data ) {

		$req = new LLMS_Dot_Com_API( '/products', array(), 'GET' );
		$data = $req->get_result();

		if ( $req->is_error() ) {
			return $data;
		}

		set_transient( 'llms_products_api_result', $data, DAY_IN_SECONDS );

	}

	return $data;

}

Top ↑

Changelog Changelog

Changelog
Version Description
3.22.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.