| @@ -33,8 +33,15 @@ | ||
| 33 | 33 | /** |
| 34 | 34 | * @var null|float |
| 35 | 35 | */ |
| 36 | 36 | public $lifetime_price; |
| 37 | + /** | |
| 38 | + * @author Leo Fajardo (@leorw) | |
| 39 | + * @since 2.3.1 | |
| 40 | + * | |
| 41 | + * @var string One of the following: `usd`, `gbp`, `eur`. | |
| 42 | + */ | |
| 43 | + public $currency; | |
| 37 | 44 | |
| 38 | 45 | #endregion Properties |
| 39 | 46 | |
| 40 | 47 | /** |
| @@ -137,5 +144,14 @@ | ||
| 137 | 144 | function annual_savings() { |
| 138 | 145 | return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses ); |
| 139 | 146 | } |
| 140 | 147 | |
| 148 | + /** | |
| 149 | + * @author Leo Fajardo (@leorw) | |
| 150 | + * @since 2.3.1 | |
| 151 | + * | |
| 152 | + * @return bool | |
| 153 | + */ | |
| 154 | + function is_usd() { | |
| 155 | + return ( 'usd' === $this->currency ); | |
| 156 | + } | |
| 141 | 157 | } |