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_billing_end_date()
Calculate the date when billing should applicable to orders created from plans with a set # of billing intervals
Description Description
Return Return
(int)
Source Source
File: includes/models/model.llms.order.php
private function calculate_billing_end_date() { $end = 0; $num_payments = $this->get( 'billing_length' ); if ( $num_payments ) { $start = $this->get_date( 'date', 'U' ); $period = $this->get( 'billing_period' ); $frequency = $this->get( 'billing_frequency' ); $end = $start; $i = 0; while ( $i < $num_payments ) { $end = strtotime( '+' . $frequency . ' ' . $period, $end ); $i++; } } return apply_filters( 'llms_order_calculate_billing_end_date', $end, $this ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.10.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: