protected function FeedsCommerceCouponProcessor::newEntity in Commerce Feeds 7
Creates a new coupon and returns it.
File
- plugins/
FeedsCommerceCouponProcessor.inc, line 32 - FeedsUserProcessor class.
Class
- FeedsCommerceCouponProcessor
- Feeds processor plugin. Create users from feed items.
Code
protected function newEntity(FeedsSource $source) {
$type = $this->config['coupon_type'];
$coupon = commerce_coupon_create($type);
$coupon->log = 'Created by FeedsCommerceCouponProcessor';
return $coupon;
}