• How can i award commission to affiliates only on the first order of every of their referrals, such that every other orders made by referred customers apart from the first, is fully awarded to admins.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi, thank you for reaching out to us. Unfortunately this is not currently possible in the plugin.

    Kind regards

    Thread Starter Abolaji Mustapha

    (@lyridio)

    How about with the track commission via plugin hook. i think something can be done. Please help.

    Thread Starter Abolaji Mustapha

    (@lyridio)

    Hello, I’ve found a solution which is simply to automate a wpam tracking cookie delete sequence just immediately after purchase by buyer. Since i’m using woo commerce all i need to do is to initiate the after purchase hook upon every referred user first purchase in order to delete wpam tracking cookie. Thank you for the development of this plugin. i rate it 5 star.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, that is great news. I was wondering if you could share a step by step solution for others to use.

    Kind regards

    • This reply was modified 5 years, 6 months ago by mbrsolution.
    Thread Starter Abolaji Mustapha

    (@lyridio)

    Yes i can and i will do that right away

    Thread Starter Abolaji Mustapha

    (@lyridio)

    if you’re using woo-commerce as your e-Commerce and order publishing solution. then initiate this hook below:

    function on_purchase( $order_id ) {
    //the code
    }
    add_action( 'woocommerce_order_status_completed', 'mojo_on_purchase' );

    add this code above to your theme’s function file

    From my study of the functionality of the plugin, i discovered that wp affiliate manager uses cookie tracking to automate pay processes. so if cookie does not exist, no commission is awarded. therefore we’re gonna add a cookie delete piece of code to avoid recurring commission every of the order by the user(make sure this is applied to a registered user). In the on_purchase function add the following line to delete cookie after first time purchase:

    setcookie("wpam_id", "", time()-3600);

    That is it. you can add conditionals before executing the line of code above.
    So what does the plugin publishers think about this?

    Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for sharing your solution.

    Enjoy the plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Limit Referral Commission to first order’ is closed to new replies.