Browse: Home / Functions /

learndash_update_user_activity

learndash_update_user_activity( array $args = array() )

Updates the user activity.


Description #


Parameters #

$args

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

  • 'activity_id'
    (int) Optional. Activity ID. Default 0.
  • 'course_id'
    (int) Optional. Course ID. Default 0.
  • 'post_id'
    (int) Optional. Post ID. Default 0.
  • 'user_id'
    (int) Optional. User ID. Default 0.
  • 'activity_type'
    (string) Optional. Type of the activity.
  • 'activity_status'
    (string) Optional. The status of the activity.
  • 'activity_started'
    (string) Optional. The timestamp of when the activity started.
  • 'activity_completed'
    (string) Optional. The timestamp of when the activity got completed.
  • 'activity_updated'
    (string) Optional. The timestamp of when the activity was last updated.
  • 'activity_action'
    (string) Optional. The action of the activity. Value can be 'update' or 'insert'. Default 'update'.
  • 'activity_meta'
    (string) Optional. The activity meta.

Default value: array()


Return #

(int) The ID of the updated activity.


Source #

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


Changelog #

Changelog
Version Description
2.3.0 Introduced.