The actress/singer was a new mum when she signed up to play an unlucky-in-love woman starting a family and she still wasn't sure about the role when fate brought her and the writer, Kate Angelo, together.
Lopez explains, "So much of the movie was art imitating life, because I had just gone through the pregnancy so it was fresh in my mind - and the character is conceiving twins through artificial insemination.
"Kate had also just been through a pregnancy and we met at this aerobics bootcamp class. She comes up to me... and she said, 'Hi, I'm Kate, I wrote The Back-Up Plan. I just had a baby too.'
"It was perfect and so fresh in our minds that we really fought with the guys sometimes about what was important for women going through that in real life."