You are here

protected function FeedsCommerceCouponProcessor::entityLoad in Commerce Feeds 7

Loads an existing coupon.

File

plugins/FeedsCommerceCouponProcessor.inc, line 42
FeedsUserProcessor class.

Class

FeedsCommerceCouponProcessor
Feeds processor plugin. Create users from feed items.

Code

protected function entityLoad(FeedsSource $source, $coupon_id) {
  $coupon = parent::entityLoad($source, $coupon_id);
  if ($this->config['update_existing'] == FEEDS_UPDATE_EXISTING) {
    $coupon->log = 'Updated by FeedsCommerceCouponProcessor';
  }
  else {
    $coupon->log = 'Replaced by FeedsCommerceCouponProcessor';
  }
  return $coupon;
}