Identify all triggers with "woocommerce:" key prefix as WooCommerce triggers
[MAILPOET-5725]
This commit is contained in:
@@ -293,7 +293,7 @@ class SendEmailAction implements Action {
|
|||||||
return (bool)array_filter(
|
return (bool)array_filter(
|
||||||
$automation->getTriggers(),
|
$automation->getTriggers(),
|
||||||
function(Step $step): bool {
|
function(Step $step): bool {
|
||||||
return in_array($step->getKey(), ['woocommerce:order-status-changed', 'woocommerce:abandoned-cart'], true);
|
return strpos($step->getKey(), 'woocommerce:') === 0;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user