Skip to content

Commit

Permalink
Add fallback for missing exclude families
Browse files Browse the repository at this point in the history
  • Loading branch information
jbclaudio committed Jan 14, 2025
1 parent 04741fd commit 65d8c89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Plugin/Job/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(
) {
}

public function getFamiliesToExport(): ?string
public function getFamiliesToExclude(): ?string
{
return $this->scopeConfig->getValue(self::PRODUCTS_FILTERS_EXCLUDED_FAMILIES);
}
Expand All @@ -25,7 +25,7 @@ public function afterGetFamiliesToImport(
AkeneoProduct $subject,
array $families
): array {
$familiesToExclude = explode(',', $this->getFamiliesToExport());
$familiesToExclude = explode(',', $this->getFamiliesToExclude() ?? '');

if (!$families || $families[0] === '') {
$families = array_values($this->familyFilter->getFamilies() ?? []);
Expand Down

0 comments on commit 65d8c89

Please sign in to comment.