Affiliate Recurring Payments

We need affiliates to Pay referrer on a recurring Basis. Each time the user payment transaction completes each month, the affiliate should also get paid.

We found this previous thread about Affiliates:

https://premium.wpmudev.org/forums/topic/question-about-affiliate-and-membership

Thread above suggest ADD this code HACK to wp-config.php :

define('AFFILIATE_PAYONCE', 'no');

Does this hack work to achive recurring affiliate payments?

  • SoftArt
    • The Incredible Code Injector

    Hi – Something went wrong – thread above not working :slight_frown: It would be much easier – if this did not require code hack. It would be best for all, if we did not need to ‘hack’ this plugin that deals with important payment of our partners. Is there any possibility your staff could add this function into the plugin itself?

    Yes, adding that define will make sure that the affiliates will be paid for every payment made by the referred user

    I just verified our code in production wp-config.php :

    // 2017.11.12.CT: WPMU: Affiliate Code Hack: AFFILIATE_PAYONCE
    define('AFFILIATE_PAYONCE', 'no');

    Testing your code hack above – we find that the Affiliate is NOT being paid for every payment transaction. Currently code above is not working, so we may be missing something…

    Please Help – This feature is very important…

  • James Morris
    • WordPress Enthusiast

    Hello VirtualArtists

    I’m terribly sorry for the delay in response here.

    Actually, that define isn’t a hack. Not sure why that was ever referred to as a hack in the first place. :disappointed: That define is actually a part of the core functionality of the plugin.

    If you check the Product Usage docs for the plugin, you will see that define, as well as a few others and some action hooks you can use to accomplish some pretty advanced functionality with.

    See: https://premium.wpmudev.org/project/wordpress-mu-affiliate/#product-usage

    Could you please review the docs and see if that will resolve your problem for you? If it does not, please reply back here and let us know and we’ll be more than happy to dig into this issue further for you. :slight_smile:

    Best regards,

    James Morris

  • SoftArt
    • The Incredible Code Injector

    Hi – Only the initial payment is being credited – we must be missing something? We have followed the docs below – but the ‘recurring’ payment is not being credited :slight_frown:

    We have enabled support access – please have a look…

    Recurring affiliate payouts

    When used to track referral sales, Affiliates defaults to paying an affiliate for the first sale only. That can be changed by adding the following to your wp-config.php file:

    define(‘AFFILIATE_PAYONCE’, ‘no’:wink:;

    With that added, affiliates will be paid for every single payment made by the referred user.

  • James Morris
    • WordPress Enthusiast

    Hello VirtualArtists

    Taking a look at your site, from what I can see from WP Admin alone, everything looks good, except you’re not getting the recurring commissions credited.

    Checking the code for the Membership 2 Add-on, the AFFILIATE_PAYONCE define should work correctly. So, I suspect there are deeper issues here we need to investigate.

    In order to help you better with your issue, would you please grant me access to your site and server so I can perform some advanced debugging?

    NOTE: Please make a full backup of your site before sending the following information.

    Please visit the Contact page and complete the form with the following information:

    Contact Us

    Option: I have a different Question

    Subject: “Attn: James Morris”

    In the Message box, please provide the following:

    – link back to this thread for reference

    – any other relevant urls

    – Admin login:

    Admin username

    Admin password

    Login url

    – Hosting Control Panel Login

    Admin username

    Admin password

    Login url

    ~OR~

    – FTP credentials

    host

    username

    password

    (and port if required)

    Best regards,

    James Morris

  • SoftArt
    • The Incredible Code Injector

    Greetings – I have backed up the site.

    Also added the FTP Login info into the “Support Access Message Box” – Can you see?

    – Support Access Enabled –

    Please login thru Support Access of the site, and you should see FTP info.

    Is this enough info for you to continue your advanced debugging?

  • James Morris
    • WordPress Enthusiast

    Hello VirtualArtists

    I’ve checked your site and debug.log. I’ve checked all settings and the plugin code. There’s nothing obvious showing why this is not working as expected. I’m going to flag this ticket for our SLS Team (code experts) so they can dig into this issue further. Thank you for your patience while we sort through this.

    Best regards,

    James Morris

  • Lindeni Mahlalela
    • Recruit

    Hello VirtualArtists

    I hope you are doing great today. I am sorry for the delayed response from our side regarding this issue.

    There is a known bug regarding the integration of Affiliates and Membership 2 plugins, fortunately there was a fix for those and I have uploaded the fixed code to your website via FTP. I suggest you run more tests to see how it goes, I am also waiting for recurring payments to kick in on my test website in order to see if this solves the problem.

    I have applied a fix for the know bug and have checked the other code and all seems correct on the code and on your settings it was fine the last time I checked. I will run more tests on my test site and see if the issue can be replicated with the fix applied, I urge you to test on your site as well and report here if there are still issues.

    I will update here soon once I have results from my tests, also please let us know how it goes on your side. I hope to hear from you soon.

    Have a nice day.

    Lindeni

  • SoftArt
    • The Incredible Code Injector

    I will update here soon once I have results from my tests, also please let us know how it goes on your side. I hope to hear from you soon.

    We never heard back from the developer above on their test results :slight_frown:

    We have tested extensively, and we still have the same bug from lat Nov 2017 :slight_frown:

    Affiliates plugin is NOT giving credit for recurring payments – only the FIRST payment gives credit. Subsequent recurring payments are NOT credited to affiliate :slight_frown:

    This make as big fire problem for us – since payments are being made Daily now, so we are in a real bind, and we need this fixed or we will lose clients.

    Original Ticket – Submitted – Nov 2017 –

    Could it be that 7 months later this bug is still not fixed?

    Please login to our site and Fix ASAP

    Support Access = Access active for 5 days

    FTP Info is in the Support Msg Box

  • SoftArt
    • The Incredible Code Injector

    Hi – Any status updates on this fix from the developer?

    We noticed support staff logged in:

    SUPPORT LOGINS

    Lindeni Mahlalela May 29, 2018 @ 1:33 pm

    Lindeni Mahlalela May 29, 2018 @ 2:53 pm

    Question: If the staff above made a fix – can we still update our WPMU plugins? Or if we update, will that overwrite any code fix the developer has made directly on our site?

  • SoftArt
    • The Incredible Code Injector

    Hi – Any status updates on this fix from the developer Lindeni Mahlalela ?

    Questions:

    1) If the staff above made a fix – can we still update our WPMU plugins? Or if we update, will that overwrite any code fix the developer has made directly on our site?

    2) Is this fix applied to the core plugins? Can we rely on this fix being applied on our other sites that use Affiliates and Membership plugins ?

  • Panos
    • SLS

    Hi there VirtualArtists ,

    So sorry for such a delay here. I managed to replicate your issue and I am attaching file

    plugins/affiliate/affiliateincludes/addons/membership2.php

    which contains a fix for this.

    I have already replaced this file on your server and kept a back up of original file, by renaming it to membership2.php.txt

    You should still keep:

    define('AFFILIATE_PAYONCE', 'no');

    in your wp-config.php

    Recurring payments should be now recorded and the credits should be also added.

    Kind regards!

  • SoftArt
    • The Incredible Code Injector

    Hi – Great Work! Thanks for the update, so it sounds like you found the bug was in the Affiliate includes “AddOn: Membership2” ?

    Questions:

    1) Can we still apply the latest update to our WPMU Membership2 and Affiliate plugins? Or if we update, will that overwrite your above AddOn fix?

    2) Has your fix above been applied to the core plugins? Can we rely on this fix being applied on our other sites that use Affiliates and Membership plugins ?

  • Katya Tsihotska
    • Support & QA

    Hi VirtualArtists

    Hope you’re having a wonderful day!

    1) Can we still apply the latest update to our WPMU Membership2 and Affiliate plugins? Or if we update, will that overwrite your above AddOn fix?

    You can update Membership 2 plugin, but the current version of the Affiliates doesn’t contain the fix, so please, don’t update Affiliates until the next release, as this will overwrite the fix.

    2) Has your fix above been applied to the core plugins? Can we rely on this fix being applied on our other sites that use Affiliates and Membership plugins ?

    Yes, this file should work on other installations with Affiliates and Membership plugins, so feel free to apply it to other sites.

    If you have any additional questions please let us know, we always are happy to help.

    Kind regards,

    Katya

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.