Skip to content

Schema aggregator: products have incorrect data due to memoization #23181

@pls78

Description

@pls78

In classes/woocommerce-schema.php we fetch data from the Meta_Tags_Context_Memoizer class, which caches the results of the first call for all the metadata. This happens under the assumption that all the metadata will be relative to a single page, which is not the case for the Schema aggregator because it iterates over different indexables.

We have two options:

  1. Add a method to the Meta_Tags_Context_Memoizer that allows to swap the current page
  2. Use the Meta_Tags_Context directly without passing through the memoizer: this requires more investigation and effort as it is going to impact classes other than Meta_Tags_Context_Memoizer.

Relevant Slack thread here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions