Hide WooCommerce segments when WooCommerce is not active

[MAILPOET-2163]
This commit is contained in:
Ján Mikláš
2019-08-13 16:37:51 +02:00
committed by Jack Kitterhing
parent 92a85d553b
commit c1c2d0a102
2 changed files with 21 additions and 3 deletions

View File

@ -168,7 +168,7 @@ class Subscriber extends Model {
$segments = Segment::orderByAsc('name')
->whereNull('deleted_at')
->whereIn('type', [Segment::TYPE_DEFAULT, Segment::TYPE_WP_USERS, Segment::TYPE_WC_USERS])
->whereIn('type', Segment::getSegmentTypes())
->findMany();
$segment_list = [];
$segment_list[] = [