Only load WC data when WC is active
MAILPOET-5467
This commit is contained in:
committed by
Aschepikov
parent
fe4621f503
commit
6b8fc3df83
@@ -127,6 +127,7 @@ class DynamicSegments {
|
||||
}
|
||||
|
||||
$data['product_attributes'] = [];
|
||||
if ($this->woocommerceHelper->isWooCommerceActive()) {
|
||||
$productAttributes = $this->woocommerceHelper->wcGetAttributeTaxonomies();
|
||||
|
||||
foreach ($productAttributes as $attribute) {
|
||||
@@ -147,6 +148,7 @@ class DynamicSegments {
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data['product_categories'] = $this->wpPostListLoader->getWooCommerceCategories();
|
||||
|
||||
|
Reference in New Issue
Block a user