Skip to content

Commit

Permalink
Use str replace to avoid dots and commas on option value code (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed May 23, 2022
1 parent 4eb5090 commit 17ccc50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ValueHandler/ProductOptionValueHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ private function addOptionValueTranslation(
private function createOptionValueCode(string ...$pieces): string
{
$slugifiedPieces = array_map(static function (string $word): ?string {
return preg_replace('/[^a-z0-9\-_]+/i', '', $word);
return str_replace(['.', ','], '', $word);
}, $pieces);

return implode('_', $slugifiedPieces);
Expand Down

0 comments on commit 17ccc50

Please sign in to comment.