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)


Top ↑

Source Source

File: includes/models/model.llms.order.php

			'billing_phone'      => '',
		);

		$user = ! is_array( $user_or_data ) ? llms_get_student( $user_or_data ) : false;
		if ( $user ) {

			$user_or_data = array();

			$map = array(
				'user_id'            => 'id',
				'billing_email'      => 'user_email',
				'billing_phone'      => 'phone',
				'billing_first_name' => 'first_name',
				'billing_last_name'  => 'last_name',
			);

			foreach ( array_keys( $to_set ) as $order_key ) {
				$to_set[ $order_key ] = $user->get( $map[ $order_key ] ?? $order_key );
			}
		}

		// Only use the default IP address if it wasn't specified in the input array.
		$to_set['user_ip_address'] = $user_or_data['user_ip_address'] ?? llms_get_ip_address();



Top ↑

Changelog Changelog

Changelog
Version Description
5.2.0 Use strict type comparision.
3.19.0 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.