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_REST_Students_Controller::get_objects_query_status_subquery( int $post_id )
Generates a subquery to check a user’s enrollment status for a given course or membership.
Parameters Parameters
- $post_id
-
(int) (Required) Course or membership id.
Return Return
(string)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-students-controller.php
private function get_objects_query_status_subquery( $post_id ) { global $wpdb; return "( SELECT meta_value FROM {$wpdb->prefix}lifterlms_user_postmeta WHERE user_id = {$wpdb->users}.ID AND post_id = {$post_id} AND meta_key = '_status' ORDER BY updated_date DESC LIMIT 1 ) AS p_{$post_id}_stat"; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |