learndash_course_item_to_activity_sync

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 #

We need to compare the new course item progress array to the existing one. Also, update the new activity DB table


Parameters #

$user_id

(int) (Optional) The user ID related to this course entry. Default 0.

$course_id

(int) (Optional) The course ID related to this user course entry. Default 0.

$course_data_new

(array) (Optional) The new course data item.

Default value: array()

$course_data_old

(array) (Optional) The old course data item.

Default value: array()


Return #

(void|array)


Source #

File: includes/ld-users.php


Changelog #

Changelog
Version Description
2.3.0 Introduced.