Move hooks inside if block where quotes are being calculated

actions won't fire unless quotes are being regenerated