LLMS_Coupon::get_formatted_amount( string $amount = 'coupon_amount' )

Get the formatted coupon amount with currency symbol and/or percentage symbol


Parameters Parameters

$amount

(string) (Optional) key for the amount to format

Default value: 'coupon_amount'


Top ↑

Return Return

(string)


Top ↑

Source Source

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

	public function get_formatted_amount( $amount = 'coupon_amount' ) {
		$amount = $this->get( $amount );
		switch ( $this->get( 'discount_type' ) ) {
			case 'percent':
				$amount .= '%';
				break;
			case 'dollar':
				$amount = llms_price( $amount );
				break;
		}
		return $amount;
	}


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.