Merge pull request #1708 from mailpoet/automatic-email-factory
Add automatic email type to newsletters factory [MQ-170]
This commit is contained in:
@@ -99,6 +99,20 @@ class Newsletter {
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Newsletter
|
||||
*/
|
||||
public function withWcAutomaticType($event = 'woocommerce_first_purchase') {
|
||||
$this->data['type'] = 'automatic';
|
||||
$this->withOptions([
|
||||
14 => 'woocommerce', // group
|
||||
15 => $event,
|
||||
16 => 'user', // sendTo
|
||||
19 => 'immediate', // afterTimeType
|
||||
]);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $options
|
||||
*
|
||||
|
Reference in New Issue
Block a user