Enrol::update_status( $new_status )
Update Enrolment status
Parameters
- $new_status
-
(Required)
Source
File: Model/Enrol.php
public function update_status( $new_status ) { $old_status = $this->status; if ( $old_status !== $new_status ) { $this->status = $new_status; $this->save(); /** * Action hook to after update enrolment status * * @since DozentLMS v.1.0.0 * * @param int $ID enrolment ID * @param string $old_status Current status of this enrolment * @param string $new_status New Enrolment Status * @param object $this Current enrolment data as model object */ do_action( 'dozent_enrolment_status_updated', $this->ID, $old_status, $new_status, $this ); } }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |