This is a drop-in replacement to improve coupon handling in Marketpress.  It is tied to 2.8.7.  If you have a different version, then do a diff between the original file and the edited one, and apply similar changes.