How to automatically remove a user from a course - Installed on Site with WPcourseware

  1. Overview
  2. Automation for WPCourseware
  3. Remove a User
  4. How to automatically remove a user from a course - Installed on Site with WPcourseware

Remove your user in a course.

This plugin is designed to be installed on the site being used alongside your automaton plugin In this case, we will be using what we feel is the best automation plugin for this purpose, and that is FlowMattic but as long as your automaton allows directly running a PHP function and individual variables it should work with no issues.

You need the following information to remove a user on a course

  1.  The Course "ID" in our example is 2; this will be automatically converted to the "Post ID
  2.  the user's email address

So you need to send the following information 

Name Value
$email

Email Address to add the course to and to create if it doesn't exist

$course_id The course ID in our case from above it is 2

Flowmattic Setup Example:

  1. This is the name of the function within the plugin we are calling "remove_user_from_course_by_course_id"
  2. We have to send individual variables called email and course_id into the function for it to work
  3. This should be our email from above of the user to remove from enrollment i.e on cancellation of a subscription
  4. This should be our course_id as described above

 


Was this article helpful?