LLMS_Coupon::get_remaining_uses()

Get the number of remaining uses calculated by subtracting # of uses from the usage limit


Return Return

(string|int)


Top ↑

Source Source

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

	public function get_remaining_uses() {

		$limit = $this->get( 'usage_limit' );

		// If usage is unlimited.
		if ( ! $limit ) {

			return _x( 'Unlimited', 'Remaining coupon uses', 'lifterlms' );

		} else {

			return $limit - $this->get_uses();

		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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