When a business purchases in Woocommerce, no commission should be given

Dear support team!
What do I have to do if a business customer purchases in Woocommerce, no commission is charged.

If customers or guests buy, the commission is calculated directly and in the levels as normal.
e.g. Customer purchases: Direct rate 20% >> 1 level 10% >> 2 level 5% >> 3 level 2%.
————————
We would also like to achieve this:
Business customer purchases: Direct rate 0%>> 1 level 0% >> 2 level 0% >> 3 level 0%.

This means that if a business customer purchases, no affiliate commission will be charged.

Additional info:
Over time, customers also become business customers.

I hope it is clearly described.
Can you help us with tips or snippets?


Comments

3 responses to “When a business purchases in Woocommerce, no commission should be given”

  1. Hi Walter,

    You need to use a formula for your rates and also utilize the affiliates_formula_computer_variables filter hook.
    Inside the callback function you need to define another variable ie
    $variables['c'] = 1;
    and check for the logged-in user, if they belong to the Business role then
    $variables['c'] = 0;

    and finally return the $variables array.

    The formula for each rate should be:
    1. For the direct s*c*0.2
    2. For level 1 s*c*0.1
    3. For level 2 s*c*0.05
    4. For level 3 s*c*0.02.

    Hope it helps.

    Kind regards,
    George

  2. ProEnergetic Avatar
    ProEnergetic

    Hi George!
    The business customers are users who are already on the website. And that are advertised in the usual way.
    We are currently using these commission rates: Direct rate 20% >> 1 level 10% >> 2 level 5% >> 3 level 2%.

    INFO:
    Business customers have their own roles.
    Normal customers have the role of customer.

    regards

  3. Hi Walter,

    Thanks for reaching our support channel.
    Sure we can help you with that setup, but first I would like to know which commission rates are you currently using. Also, these business customers are only customers being referred the usual way by your affiliates or they can also be affiliates currently active on your site?

    Kind regards,
    George

Share