LLMS_Order::start_access()
Record the start date of the access plan and schedule expiration if expiration is required in the future
Return Return
(void)
Source Source
File: includes/models/model.llms.order.php
public function start_access() { // Only start access if access isn't already started. $date = $this->get( 'start_date' ); if ( ! $date ) { // Set the start date to now. $date = llms_current_time( 'mysql' ); $this->set( 'start_date', $date ); } $this->unschedule_expiration(); // Setup expiration. if ( in_array( $this->get( 'access_expiration' ), array( 'limited-date', 'limited-period' ), true ) ) { $expires_date = $this->get_access_expiration_date( 'Y-m-d H:i:s' ); $this->set( 'date_access_expires', $expires_date ); $this->maybe_schedule_expiration(); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.2.0 | Use strict type comparision. |
3.19.0 | Unknown. |
3.0.0 | Introduced. |