LLMS_AJAX_Handler::membership_remove_auto_enroll_course( array $request )
Remove a course from the list of membership auto enrollment courses
Description Description
Called from "Auto Enrollment" tab of LLMS Membership Metaboxes.
Parameters Parameters
- $request
-
(array) (Required) $_POST data.
Return Return
((void|WP_Error))
Source Source
File: includes/class.llms.ajax.handler.php
* @param array $request $_POST data. * @return (void|WP_Error) */ public static function membership_remove_auto_enroll_course( $request ) { if ( empty( $request['post_id'] ) || empty( $request['course_id'] ) ) { return new WP_Error( 'error', __( 'Missing required parameters.', 'lifterlms' ) ); } $membership = new LLMS_Membership( $request['post_id'] ); if ( ! $membership->remove_auto_enroll_course( intval( $request['course_id'] ) ) ) { return new WP_Error( 'error', __( 'There was an error removing the course, please try again.', 'lifterlms' ) );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |