Tier Rates

The following examples show how to retrieve information about tier rates. General tier rates are superseded by specific tier rates where set for an individual affiliate. This should be taken into account where custom methods are based on tier rates.

Get the general tier rates:

$rates = get_option( Affiliates_Multi_Tier::TIER_RATES, array() );

Get the number of tiers:

$n_tiers = get_option( Affiliates_Multi_Tier::N_TIERS, Affiliates_Multi_Tier::MAX_TIERS );

Whether tier rates are relative:

$relative_tier_rates = get_option( Affiliates_Multi_Tier::RELATIVE_TIER_RATES, false );

Get the specific level-rates for an affiliate:

$referrer_tier_rates = get_option( Affiliates_Multi_Tier::TIER_RATES . '_' . intval( $affiliate_id ), array() );