How to remove coffee stains from wool carpet.
Act immediately! Do not let the spot dry. Using absorbent white paper or cotton towels, BLOT (do not rub) the area until no more liquid is transferred into your towels. If the spill is large, use a wet-vacuum to vacuum up all the coffee or tea possible. (Do not use your regular household vacuum, it will be ruined.
Apply cool water to the coffee or tea spill using a spray bottle, being careful not to over wet the carpet. BLOT (do not rub) to absorb the spill and the water. Repeat this process until no more color is transferred into your towels.
If the spot is still visible on the carpet, apply white vinegar with an eyedropper (do not use wine or cider vinegar). BLOT (do not rub) gently after each application of white vinegar until no more color transfers onto your towel.
Perform a final cool water rinse and a final BLOTTING. Perform a final blotting of the area by placing a clean absorbent white cotton towel over the affected area and standing on it.
Yes, act yesterday.
If your carpet is truly wool, not acrylic, (Berber real vs. affordable) then you can use peroxide on it.