Issues with Price

In the email notification that is sent to the affiliate, the amount that short code pulls through a number with 6 digits after the decimal point. So for example the amount shown in the email would be £23.8000000

How can I fix this.

Also some of our products do not carry any affiliate fee, but the affiliates still advertise them and sell them. They then get an email to say they have made £00.000000. If there any way to remove this from the email when there is no fee (only).

Thanks


Comments

4 responses to “Issues with Price”

  1. Hi awesome [affiliate_name],

    You made a sale! Yay!

    A referral has been credited to you on [site_title] for the amount of [referral_amount] GBP ! Congrats!

    Thanks so much!
    [site_title]
    [site_url]

    1. Thanks,
      The email should be sent with two decimals.
      But we can use the ‘affiliates_notifications-tokens’ filter.This code should work:
      add_filter( 'affiliates_notifications_tokens', 'my_affiliates_notifications_tokens', 10, 1 );
      function my_affiliates_notifications_tokens ( $data ) {
      $data['referral_amount'] = number_format( $data['referral_amount'], 2 );
      return $data;
      }

      Kind Regards,
      Antonio B.

  2. Hello

    I see it as two decimals and when I go into the order it is also two decimals.

    This is the notification message –

  3. Hi David,
    How do you see the referral amount from Affiliates->Referrals, with two or six decimals?
    Please share your affiliates notification message (from Affiliates->Notifications), please use pastebin.com
    Related to the referrals with £00.000000, sorry, right now there isn’t an option to filter this notifications (We will study it, because it seems to make sense to be able to filter it).
    Kind Regards,
    Antonio B.

Share