Skip to content

Instantly share code, notes, and snippets.

vegaix9

Block or report user

Report or block vegaix9

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@amdrew
amdrew / gist:ae2cf4bad5ac31d8e17b
Last active Aug 29, 2015
AffiliateWP - Per-affiliate, per-product rate
View gist:ae2cf4bad5ac31d8e17b
<?php
function affwp_custom_per_product_per_affiliate_referral_amount( $referral_amount, $affiliate_id, $amount, $reference, $product_id ) {
$special_affiliate_id = 145;
$special_product_id = 3133;
$special_referral_amount = $amount * .8; // 80%
if ( $special_affiliate_id == $affiliate_id && $special_product_id == $product_id ) {
$referral_amount = $special_referral_amount;
You can’t perform that action at this time.