Fixes #401
Merge pull request #402 from sumobi/issue/401

Fixes #401
Ensure the discount code processing for EDD runs before referral completion. #406
Use ->affiliate_id in discount code tracking to fix #406
Merge branch 'master' of https://github.com/affiliatewp/AffiliateWP into add-on/lifetime-commissions

Conflicts:
	includes/integrations/class-edd.php
Don't allow affiliate's rate types to take effect if they don't also have a rate. Closes #408
Merge branch 'master' of https://github.com/affiliatewp/AffiliateWP into add-on/lifetime-commissions
Pass referral total to affiliate_wp()->referrals->update
Merge pull request #412 from sumobi/issue/406-new

Pass referral total to affiliate_wp()->referrals->update
Merge branch 'master' of https://github.com/affiliatewp/AffiliateWP into add-on/lifetime-commissions
Integration modifications