Last active
December 6, 2022 04:33
-
-
Save codelion7/04dcfa136582f842ffa9 to your computer and use it in GitHub Desktop.
Allow or Deny Lifetime Affiliate Overrides - Filterable
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 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use?