We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
That code will most likely no longer work as we use custom tables now for commissions. Needs a rewrite to get the data correctly from the DB.
The text was updated successfully, but these errors were encountered:
This is the code snippet that @tubiz provided so that a commission is not recorded if the purchase was a referral
function affwp_eddc_restrict_commission( $commissions_calculated, $payment ) { if ( ! function_exists( 'affiliate_wp' ) ) { return $commissions_calculated; } $referral = affiliate_wp()->referrals->get_by_with_context( 'reference', $payment->ID, 'edd' ); if ( ! empty( $referral ) ) { return array(); } return $commissions_calculated; } add_filter( 'eddc_commissions_calculated', 'affwp_eddc_restrict_commission', 10, 2 );
Sorry, something went wrong.
No branches or pull requests
That code will most likely no longer work as we use custom tables now for commissions.
Needs a rewrite to get the data correctly from the DB.
The text was updated successfully, but these errors were encountered: