Can’t do rates lower than 1%?

Posted in

Hi,
I need to be able to assign a rate of 0.25%, which would be “0.0025” in the rate field. However it always changes it back to “0.00”. How can I assign a rate lower than 1%?
Thanks.

One Response to Can’t do rates lower than 1%?

  1. George February 9, 2024 at 10:29 pm #

    Hi Ryan,

    Thanks for using our plugin on your site.
    In order to use more than the default two decimals, you need to add the following filter hook

    function affiliates_change_decimals_example( $decimals, $context ) {
    $decimals = 6;

    return $decimals;
    }
    add_filter( 'affiliates_referral_amount_decimals', 'affiliates_change_decimals_example', 10, 2 );

    In this example, you will be able to use up to 6 decimals, but you can adjust the value according to your needs.
    The snippet should be added to the functions.php file of your child theme, so that it will be kept intact upon any future update of your theme.

    Kind regards,
    George

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share