• I want to set a minimum order amount of purchase for someone registered as an affiliate to get the comission from our website. Please let me know how can I do this. Because as per current settings they can even purchase something for AED 100 from the reference URL and get 10% commision. But I want them to purchase at least the order of AED 1000 and then they should be able to get 10% comission. Waiting for a your reply. Thank You!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    thanks for contacting us!

    To achieve what you need, please add the following code in the functions.php file of your active theme:

    if ( ! function_exists('yith_wcaf_affiliate_custom_commission_from_affiliates')) {
    function yith_wcaf_affiliate_custom_commission_from_affiliates( $rate, $affiliate, $product, $order_id ) {
    $order = wc_get_order( $order_id );
    $order_total = $order->get_total();

    if ( !! $order && !! $affiliate ) {
    if ( $order_total < 1000 ) {
    $rate = 0;
    }
    }

    return $rate;
    }
    add_filter( 'yith_wcaf_affiliate_rate', 'yith_wcaf_affiliate_custom_commission_from_affiliates', 99, 4 );
    }

    Please note that this change will only work for new commissions.

    Could you check it, please?

    Best regards.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.