I'm thinking the portable carts that sell food, like popcorn, churros, ice cream bars and stuff, are cash only. But I know that some of the places that look more permanent, like the souvenir cart in the castle courtyard, have a credit-card swiper and can take CCs and gift cards.
I like to get Disney gift cards to use for treats and souvenirs. DD13 and I each carried one with $100 on it for our 5-day trip, and that was our mad money to use for whatever we felt like. You can use it at any of the counter service or table service restaurants, gift shops, and in the hotel gift shops, as well. On our last day we just used up the balance paying for DH's sweatshirt we brought home for him.