Depends where you are (like most of these things.) Where I've lived, card-only isn't uncommon because cash is an expensive hassle for smaller businesses to deal with. Also a potential security risk if it has to be left on-premise overnight.
However, this doesn't necessarily mean credit card, usually it means Maestro or EFTPOS or whatever. These tend to have low fees and function roughly like a near-enough-to-immediate direct credit.
In general, places that don't accept cash will also accept credit card for non-locals, but it's not at all uncommon for (usually smaller) places that accept cash to not accept credit card, even if they do accept the local debit card system, due to the extra expense.