Thanks for the replies, but I must admit... this is all a little bit confusing for me.
I notice a few people saying "the hacker would be to blame". Well, that's all very well and good, but I'm working on the assumption that the hacker doesn't get caught. I thought that was obvious.
Someone else gave the advice.... "Just make sure you don't store credit card details on a database". Well... that all sounds very well and good, but over in the General PHP forum I've got one or two highly respected members of this forum giving me advice on how to encrypt data that is to be stored in MySQL (such as credit card data).
Another seemingly sensible response has been to say that we should write into the contracts that it's not our fault if the site gets hacked. Well... again, that's all very good if you're in a court of law but it ain't no good if you're on the streets trying to sell online shops to small time local businesses!
And for the person who said that the shop is to blame because they should have checked the software out.... Ha!!! That's ridiculous! Let's remember that the entire reason that they're calling a PHP guy in in the first place is because they don't know how to do PHP! So, are we seriously saying that after they've paid good money for a PHP guy to build a shop that they should lift the phone and hire a second programmer to check that all the programmes are ok?
I am very grateful for the replies folks, but so far it seems that the only thing we can be sure of is a lack of clarity.