class-fs-affiliate-terms.php
3 years ago
class-fs-affiliate.php
5 years ago
class-fs-billing.php
5 years ago
class-fs-entity.php
5 years ago
class-fs-payment.php
5 years ago
class-fs-plugin-info.php
5 years ago
class-fs-plugin-license.php
2 years ago
class-fs-plugin-plan.php
11 months ago
class-fs-plugin-tag.php
11 months ago
class-fs-plugin.php
3 years ago
class-fs-pricing.php
5 years ago
class-fs-scope-entity.php
5 years ago
class-fs-site.php
1 year ago
class-fs-subscription.php
5 years ago
class-fs-user.php
1 year ago
index.php
5 years ago
class-fs-affiliate.php
84 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package Freemius |
| 4 | * @copyright Copyright (c) 2015, Freemius, Inc. |
| 5 | * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 |
| 6 | * @since 1.2.3 |
| 7 | */ |
| 8 | |
| 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | exit; |
| 11 | } |
| 12 | |
| 13 | class FS_Affiliate extends FS_Scope_Entity { |
| 14 | |
| 15 | #region Properties |
| 16 | |
| 17 | /** |
| 18 | * @var string |
| 19 | */ |
| 20 | public $paypal_email; |
| 21 | /** |
| 22 | * @var number |
| 23 | */ |
| 24 | public $custom_affiliate_terms_id; |
| 25 | /** |
| 26 | * @var boolean |
| 27 | */ |
| 28 | public $is_using_custom_terms; |
| 29 | /** |
| 30 | * @var string status Enum: `pending`, `rejected`, `suspended`, or `active`. Defaults to `pending`. |
| 31 | */ |
| 32 | public $status; |
| 33 | /** |
| 34 | * @var string |
| 35 | */ |
| 36 | public $domain; |
| 37 | |
| 38 | #endregion Properties |
| 39 | |
| 40 | /** |
| 41 | * @author Leo Fajardo |
| 42 | * |
| 43 | * @return bool |
| 44 | */ |
| 45 | function is_active() { |
| 46 | return ( 'active' === $this->status ); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * @author Leo Fajardo |
| 51 | * |
| 52 | * @return bool |
| 53 | */ |
| 54 | function is_pending() { |
| 55 | return ( 'pending' === $this->status ); |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * @author Leo Fajardo |
| 60 | * |
| 61 | * @return bool |
| 62 | */ |
| 63 | function is_suspended() { |
| 64 | return ( 'suspended' === $this->status ); |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * @author Leo Fajardo |
| 69 | * |
| 70 | * @return bool |
| 71 | */ |
| 72 | function is_rejected() { |
| 73 | return ( 'rejected' === $this->status ); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * @author Leo Fajardo |
| 78 | * |
| 79 | * @return bool |
| 80 | */ |
| 81 | function is_blocked() { |
| 82 | return ( 'blocked' === $this->status ); |
| 83 | } |
| 84 | } |