LLMS_Access_Plan::get_access_period_name( string $period = null, int $length = null )

Get the translated and pluralized name of the plan’s access period


Parameters Parameters

$period

(string) (Optional) Untranslated access period, if not supplied uses stored value for the plan.

Default value: null

$length

(int) (Optional) Access length (for pluralization), if not supplied uses stored value for the plan.

Default value: null


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/models/model.llms.access.plan.php

	public function get_access_period_name( $period = null, $length = null ) {

		$period = $period ? $period : $this->get( 'access_period' );
		$length = $length ? $length : $this->get( 'access_length' );

		$period = llms_get_time_period_l10n( $period, $length );

		/**
		 * Filter the translated name of an access plan's billing period.
		 *
		 * @since 3.4.6
		 * @version 3.4.6
		 *
		 * @param string $period Translated period name.
		 * @param int $length Access length, used for pluralization.
		 * @param LLMS_Access_Plan $this Access plan instance.
		 */
		return apply_filters( 'llms_plan_get_access_period_name', $period, $length, $this );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.3.0 Use llms_get_time_period_l10n().
3.4.6
3.23.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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