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'
Return Return
(string)
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |