This is probably not the main issue, but are you missing a comma between $data and $course_id in the arguments for the learndash_course_completed callback?
Does $data contain the user_id?
If so can you just call memberpress_membership_account_prep() from within the callback and pass in the user_id?
(You may also want to set default values for $feed and $entry since you don't appear to be using them)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is probably not the main issue, but are you missing a comma between $data and $course_id in the arguments for the
learndash_course_completed
callback?Does
$data
contain the user_id?If so can you just call
memberpress_membership_account_prep()
from within the callback and pass in the user_id?(You may also want to set default values for $feed and $entry since you don't appear to be using them)