They are widely accepted. That said, we were in Cascais (near Lisbon) Portugal and were in a restaurant that did not accept cards (said so in big letters on the menu). You can always ask when you walk in.
We were in A Coruna and Santiago de Comp. Here are some of out pcitures
A Coruna https://portugalandnspain.shutterfly.com/pictures/238
Santiago de Comp. https://portugalandnspain.shutterfly.com/pictures/215