This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$affiliate_id = affwp_get_affiliate_id(); | |
?> | |
<div id="affwp-affiliate-dashboard-referrals" class="affwp-tab-content"> | |
<h4><?php _e( 'Referrals', 'affiliate-wp' ); ?></h4> | |
<?php | |
$per_page = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Prevent overwriting existing lifetime affiliate | |
if ( get_user_meta( $user_id, 'affwp_lc_affiliate_id', true ) ) { | |
if( ! (bool) apply_filters( 'affwp_lc_update_affiliate', false, $affiliate_id, $user_id, $referral, $this->context ) ) { | |
return true; // Allow extensions to update lifetime affiliates | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run if AffiliateWP MLM is Active | |
if ( class_exists( 'AffiliateWP_Multi_Level_Marketing' ) ) { | |
/** | |
* Adds Affiliate URL to Affiliate Data from the Sub Affiliates Tooltip (Downline Only) | |
* | |
* @since 1.1.6 | |
* @return array | |
*/ | |
function affwp_mlm_add_url_aff_data( $aff_data = array(), $affiliate_id = 0, $disabled_aff_data = array() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run if AffiliateWP MLM is Active | |
if ( class_exists( 'AffiliateWP_Multi_Level_Marketing' ) ) { | |
/** | |
* Adds Affiliate URL to Affiliate Data from the Sub Affiliates Tooltip (Downline Only) | |
* | |
* @since 1.1.6 | |
* @return array | |
*/ | |
function affwp_mlm_add_email_aff_data( $aff_data = array(), $affiliate_id = 0, $disabled_aff_data = array() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$affiliate_id = affwp_get_affiliate_id(); | |
$bonuses = get_active_bonuses(); | |
$bonus_count = count( $bonuses ); | |
// Run if AffiliateWP Ranks is Active | |
if ( class_exists( 'AffiliateWP_Ranks' ) ) { | |
$ranks = get_ranks(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( class_exists( 'KB_Support' ) ) { | |
/** | |
* Allow Vendors to Manage Tickets (Make them Support Agents) | |
* | |
* @since 1.0 | |
* @return array | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make sure AffiliateWP is active | |
if ( function_exists( 'affiliate_wp' ) ) { | |
// Make sure AffiliateWP MLM is active | |
//if ( ! class_exists( 'AffiliateWP_Multi_Level_Marketing' ) ) return; | |
/** | |
* Require a Specific Rank & Product Purchase to Start a New Cycle | |
* | |
* @since 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function sync_member_type( $user_id = 0 ) { | |
if ( empty( $user_id ) ) | |
$user_id = get_current_user_id(); | |
$memb_types = bp_get_member_type( $user_id, false ); | |
switch_to_blog( 3 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sets a user's buddypress member type(s) globally across all sites | |
* | |
* @since 1.0 | |
*/ | |
function bp_set_global_member_type( $user_id = 0, $member_type = '', $append = false ) { | |
// Append new member type to global member type array | |
if ( $append == true ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retrieves an array of all network sites | |
* | |
* @since 1.0 | |
* @return array | |
*/ | |
function get_network_sites() { | |
global $wpdb; | |
$blogs = $wpdb->get_results(" |
NewerOlder