-
Hello,
Since the update due to the issue with Divi, our injecting of review schema has stopped working. THere seems to be some hard final override now preventing our injection.
I’m using the rank_math/json_ld filter to inject custom aggregateRating and review fields into the Product schema on select product pages. The code runs correctly — I can see the <!– filter ran –> comment, and the $data[‘@graph’] is modified inside the filter.
However, the injected data (specifically aggregateRating and review) does not appear in the rendered JSON-LD output, even though it’s present in the PHP $data object at the point of return.
There is no issue site-wide — only on certain products where I’m injecting reviews from a hardcoded source.
Can you confirm:
Does Rank Math run a final sanitisation or override that might strip aggregateRating and review unless specific conditions are met?
Is there a whitelist or expected field structure that would cause injected properties to be discarded?
Is there a documented way to reliably inject only the review and rating blocks via rank_math/json_ld, without replacing the full Product schema or switching to a custom schema template?
We use Divi and im working in the rank-math.php child theme file. The London Dispensary
Thanks.
The ticket ‘Issue with injecting since upate’ is closed to new replies.