Either legislation is changed or enforcement is gone. It is standard to see cash price posting with notices about convenience and processing fees at NY restaurants for example and of course has always existed for gas pricing.
I charge processing fees myself and after confirming myself also had local legal vet it. It was years ago but at the time there was just a cap on what that fee can be (4%)
I sold merchant processing in my twenties for a bit, that was definitely a real or assumed regulation at that time.
This suggests that there are state level regulations that may not align nationally to me