learndash_course_item_to_activity_sync( int $user_id, int $course_id, array $course_data_new = array(), array $course_data_old = array() )
Syncs the course date with the user activity.
Description Description
We need to compare the new course item progress array to the existing one. Also, update the new activity DB table
Parameters Parameters
- $user_id
-
(Optional) The user ID related to this course entry. Default 0.
- $course_id
-
(Optional) The course ID related to this user course entry. Default 0.
- $course_data_new
-
(Optional) The new course data item.
Default value: array()
- $course_data_old
-
(Optional) The old course data item.
Default value: array()
Return Return
(void|array)
Source Source
File: includes/ld-users.php
Changelog Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |