Skip to content

Commit

Permalink
Merge pull request #49 from justbetter/feature/exclude-families-fix
Browse files Browse the repository at this point in the history
Add fallback for missing exclude families
  • Loading branch information
jbclaudio authored Jan 14, 2025
2 parents 04741fd + 65d8c89 commit 3ffd3ed
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 3ffd3ed

Please sign in to comment.