Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Analytics_Lessoncompletions_Widget::get_lesson_ids( array $products )
Retrieve an array of lesson ids for all the products in the current filter
Parameters Parameters
- $products
-
(array) (Required) array of product ids
Return Return
(array)
Source Source
File: includes/admin/reporting/widgets/class.llms.analytics.widget.lessoncompletions.php
private function get_lesson_ids( $products ) { $lessons = array(); // Loop through all products. foreach ( $products as $product ) { // Ignore the memberships. if ( 'llms_membership' === get_post_type( $product ) ) { continue; } // Get the course. $course = llms_get_post( $product ); $lessons = array_merge( $course->get_lessons( 'ids' ) ); } return $lessons; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |