Browse: Home / Functions /


learndash_get_user_activity( array $args = array(),  bool $activity_create = false )

Gets the user activity.

Description #

Parameters #


(array) (Optional) An array of user activity arguments.

  • 'course_id'
    (int) Optional. Course ID. Default 0.
  • 'activity_type'
    (string) Type of the activity.

Default value: array()


(bool) (Optional) It true will create to activity record.

Default value: false

Return #

(object|array|null) Activity object (LDLMS_Activity) or null if not found.

Source #

File: includes/course/ld-activity-functions.php

Changelog #

Version Description
3.5.0 Added $activity_create param.
2.3.0 Introduced.