Is it haram to be a cashier at a grocery store that sells pork and alcohol, if you must scan those items at checkout? If it is haram and you have to quit but still have the money from working, is that income haram even though you just learned the ruling on the matter?
Your income is lawful; however, you must avoid bagging alcohol and whatever is considered aiding others to engage in unlawful acts. As for the paycheck the cashier receives for this job, since the store is not designated and limited to unlawful business, it shouldn’t be an issue. However, the best for a believer is to avoid such jobs as much as possible.