public/wordpress/wp-content/plugins/wp-courseware/includes/models/subscription.php
/**
	 * Updates status of subscription immediately. Subscription must exist.
	 *
	 * @since 4.3.0
	 *
	 * @param string $new_status Status to change the subscription to.
	 * @param string $note Optional note to add.
	 * @param bool   $manual Is this a manual order status change?
	 *
	 * @return bool
	 */
Updates status of subscription immediately. Subscription must exist.

@param string $new_status Status to change the subscription to.
@param string $note Optional note to add.

@return bool
Updates status of subscription immediately . Subscription must exist . @param string $new_status Status to change the subscription to . @param string $note Optional note to add . @return bool
public function update_status( $new_status, $note = '', $manual = false ) {
		try {
			if ( ! $this->get_id() ) {
				return false;
			}
			$this->set_status( $new_status, $note, $manual );
			$this->save();
		} catch ( Exception $e ) {
			wpcw_file_log( array( 'message' => sprintf( 'Update status of subscription #%d failed!', $this->get_id() ), array( 'order' => $this, 'error' => $e ) ) );
			return false;
		}
		return true;
	}
public function update_status ( $ new_status , $ note = '' , $ manual = false ) { try { if ( ! $ this -> get_id ( ) ) { return false ; } $ this -> set_status ( $ new_status , $ note , $ manual ) ; $ this -> save ( ) ; } catch ( Exception $ e ) { wpcw_file_log ( array ( 'message' => sprintf ( 'Update status of subscription #%d failed!' , $ this -> get_id ( ) ) , array ( 'order' => $ this , 'error' => $ e ) ) ) ; return false ; } return true ; }
Updates status of subscription immediately.
Updates status of subscription immediately .