I did think about suggesting 'thinning it' but then you'd just have a much bigger stain (you need a lot of WD40, as well!).
Reg, oldwoman is correct in that WD40 would thin the cooking oil and 'unstick it' from the carpet but you'd still need a way of sucking the resultant gunk out of the carpet. Otherwise, the thinner would just evaporate again, and leave your oil behind.
Possibly the best way would be a combination: thin it first, with WD40 (or possibly paraffin) and immediately steam clean it, whilst it was still thin.
Another approach to fat/oil (on suede, anyway) is to rub it with powdered chalk.