I am trying to set a rate of 0.095 (9.5%), however, when I do this and save the setting, affiliates pro starts calculating the rate as if it were 9%, which is wrong. What is the fix for this?
Cannot set rate past 2 decimal places
Posted in Affiliates Pro
Perfect!!
Hi George,
This has solved my issue.
Thank you
Mat
Hi Mathew,
Regarding decimals, you need to use the following snippet in your functions.php file of your theme.
function affiliates_change_decimals_example( $decimals, $context ) {
if ( $context === 'display' ) {
$decimals = 2;
} else {
$decimals = 3;
}
return $decimals;
}
add_filter(
'affiliates_referral_amount_decimals',
'affiliates_change_decimals_example'
);
this snippet will use 2 decimals for displaying and 3 for calculations. The detailed description for the filter
affiliates_referral_amount_decimals
can be found here.Kind regards,
George