add hook for discount codes