docs: def applyReferrerVouchersTemporarily(sender,**kwargs):
      '''
      Unlike voucher codes which have to be manually supplied, referrer discounts are
      automatically applied here, assuming that the referral program is enabled.
      '''
  
      # Only continue if the referral program is enabled
      if not getConstant('referrals__enableReferralProgram'):
          return
  
      logger.debug('Signal fired to temporarily apply referrer vouchers.')
  
      reg = kwargs.pop('registration')
  
      # Email address is unique for users, so use that
      try:
          c = Customer.objects.get(user__email=reg.email)
          vouchers = c.getReferralVouchers()
      except ObjectDoesNotExist:
          vouchers = None
  
      if not vouchers:
          logger.debug('No referral vouchers found.')
          return
  
      for v in vouchers:
          TemporaryVoucherUse(voucher=v,registration=reg,amount=0).save()