Skip to content

Product.php setIsSimilarToAttributes deletes "offers" #63

Open
@trebaxa

Description

@trebaxa

We have to modifiy this line:
$properties = array_filter($properties, 'strlen');

Because this line removes all arrays from product, which es added bei isSimilarTo property. For example: it removes "offers" , which is required for valid structured data.

Fix could be:
$properties= array_filter($properties, function($var) {
return !empty($var);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions