Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Order::calculate_trial_end_date( string $format = 'Y-m-d H:i:s' )

Calculate the end date of the trial

Parameters Parameters


(string) (Optional) Desired return format of the date. Defalt is 'Y-m-d H:i:s'.

Default value: 'Y-m-d H:i:s'

Top ↑

Return Return


Top ↑

Source Source

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

	private function calculate_trial_end_date( $format = 'Y-m-d H:i:s' ) {

		$start = $this->get_date( 'date', 'U' ); // Start with the date the order was initially created.

		$length = $this->get( 'trial_length' );
		$period = $this->get( 'trial_period' );

		$end = strtotime( '+' . $length . ' ' . $period, $start );

		$ret = date_i18n( $format, $end );

		return apply_filters( 'llms_order_calculate_trial_end_date', $ret, $format, $this );


Top ↑

Changelog Changelog

Version Description
3.10.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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