Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../wp-conte.../plugins/content-.../inc/freemius/includes/entities
File: class-fs-affiliate-terms.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* @package Freemius
[2] Fix | Delete
* @copyright Copyright (c) 2015, Freemius, Inc.
[3] Fix | Delete
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
[4] Fix | Delete
* @since 1.2.3
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[8] Fix | Delete
exit;
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
class FS_AffiliateTerms extends FS_Scope_Entity {
[12] Fix | Delete
[13] Fix | Delete
#region Properties
[14] Fix | Delete
[15] Fix | Delete
/**
[16] Fix | Delete
* @var bool
[17] Fix | Delete
*/
[18] Fix | Delete
public $is_active;
[19] Fix | Delete
/**
[20] Fix | Delete
* @var string Enum: `affiliation` or `rewards`. Defaults to `affiliation`.
[21] Fix | Delete
*/
[22] Fix | Delete
public $type;
[23] Fix | Delete
/**
[24] Fix | Delete
* @var string Enum: `payout` or `credit`. Defaults to `payout`.
[25] Fix | Delete
*/
[26] Fix | Delete
public $reward_type;
[27] Fix | Delete
/**
[28] Fix | Delete
* If `first`, the referral will be attributed to the first visited source containing the affiliation link that
[29] Fix | Delete
* was clicked.
[30] Fix | Delete
*
[31] Fix | Delete
* @var string Enum: `first` or `last`. Defaults to `first`.
[32] Fix | Delete
*/
[33] Fix | Delete
public $referral_attribution;
[34] Fix | Delete
/**
[35] Fix | Delete
* @var int Defaults to `30`, `0` for session cookie, and `null` for endless cookie (until cookies are cleaned).
[36] Fix | Delete
*/
[37] Fix | Delete
public $cookie_days;
[38] Fix | Delete
/**
[39] Fix | Delete
* @var int
[40] Fix | Delete
*/
[41] Fix | Delete
public $commission;
[42] Fix | Delete
/**
[43] Fix | Delete
* @var string Enum: `percentage` or `dollar`. Defaults to `percentage`.
[44] Fix | Delete
*/
[45] Fix | Delete
public $commission_type;
[46] Fix | Delete
/**
[47] Fix | Delete
* @var null|int Defaults to `0` (affiliate only on first payment). `null` for commission for all renewals. If
[48] Fix | Delete
* greater than `0`, affiliate will get paid for all renewals for `commission_renewals_days` days after
[49] Fix | Delete
* the initial upgrade/purchase.
[50] Fix | Delete
*/
[51] Fix | Delete
public $commission_renewals_days;
[52] Fix | Delete
/**
[53] Fix | Delete
* @var int Only cents and no percentage. In US cents, e.g.: 100 = $1.00. Defaults to `null`.
[54] Fix | Delete
*/
[55] Fix | Delete
public $install_commission;
[56] Fix | Delete
/**
[57] Fix | Delete
* @var string Required default target link, e.g.: pricing page.
[58] Fix | Delete
*/
[59] Fix | Delete
public $default_url;
[60] Fix | Delete
/**
[61] Fix | Delete
* @var string One of the following: 'all', 'new_customer', 'new_user'.
[62] Fix | Delete
* If 'all' - reward for any user type.
[63] Fix | Delete
* If 'new_customer' - reward only for new customers.
[64] Fix | Delete
* If 'new_user' - reward only for new users.
[65] Fix | Delete
*/
[66] Fix | Delete
public $reward_customer_type;
[67] Fix | Delete
/**
[68] Fix | Delete
* @var int Defaults to `0` (affiliate only on directly affiliated links). `null` if an affiliate will get
[69] Fix | Delete
* paid for all customers' lifetime payments. If greater than `0`, an affiliate will get paid for all
[70] Fix | Delete
* customer payments for `future_payments_days` days after the initial payment.
[71] Fix | Delete
*/
[72] Fix | Delete
public $future_payments_days;
[73] Fix | Delete
/**
[74] Fix | Delete
* @var bool If `true`, allow referrals from social sites.
[75] Fix | Delete
*/
[76] Fix | Delete
public $is_social_allowed;
[77] Fix | Delete
/**
[78] Fix | Delete
* @var bool If `true`, allow conversions without HTTP referrer header at all.
[79] Fix | Delete
*/
[80] Fix | Delete
public $is_app_allowed;
[81] Fix | Delete
/**
[82] Fix | Delete
* @var bool If `true`, allow referrals from any site.
[83] Fix | Delete
*/
[84] Fix | Delete
public $is_any_site_allowed;
[85] Fix | Delete
/**
[86] Fix | Delete
* @var string $plugin_title Title of the plugin. This is used in case we are showing affiliate form for a Bundle instead of the `plugin` in context.
[87] Fix | Delete
*/
[88] Fix | Delete
public $plugin_title;
[89] Fix | Delete
[90] Fix | Delete
#endregion Properties
[91] Fix | Delete
[92] Fix | Delete
/**
[93] Fix | Delete
* @author Leo Fajardo (@leorw)
[94] Fix | Delete
*
[95] Fix | Delete
* @return string
[96] Fix | Delete
*/
[97] Fix | Delete
function get_formatted_commission()
[98] Fix | Delete
{
[99] Fix | Delete
return ( 'dollar' === $this->commission_type ) ?
[100] Fix | Delete
( '$' . $this->commission ) :
[101] Fix | Delete
( $this->commission . '%' );
[102] Fix | Delete
}
[103] Fix | Delete
[104] Fix | Delete
/**
[105] Fix | Delete
* @author Leo Fajardo (@leorw)
[106] Fix | Delete
*
[107] Fix | Delete
* @return bool
[108] Fix | Delete
*/
[109] Fix | Delete
function has_lifetime_commission() {
[110] Fix | Delete
return ( 0 !== $this->future_payments_days );
[111] Fix | Delete
}
[112] Fix | Delete
[113] Fix | Delete
/**
[114] Fix | Delete
* @author Leo Fajardo (@leorw)
[115] Fix | Delete
*
[116] Fix | Delete
* @return bool
[117] Fix | Delete
*/
[118] Fix | Delete
function is_session_cookie() {
[119] Fix | Delete
return ( 0 == $this->cookie_days );
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
/**
[123] Fix | Delete
* @author Leo Fajardo (@leorw)
[124] Fix | Delete
*
[125] Fix | Delete
* @return bool
[126] Fix | Delete
*/
[127] Fix | Delete
function has_renewals_commission() {
[128] Fix | Delete
return ( is_null( $this->commission_renewals_days ) || $this->commission_renewals_days > 0 );
[129] Fix | Delete
}
[130] Fix | Delete
}
[131] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function