-
Notifications
You must be signed in to change notification settings - Fork 954
Description
version 15.8 Indexable_Link_Builder function build( $indexable, $content ) {
resets the global post data which causes compatibility issues for any customisations which modify new posts and may well be the underlying issue to #16672, #16600 and others
This was identified and reported to me by @fkoomek on https://gist.github.com/Jon007/ae3a112659d6670ebbd2f26d55143773
and I have retested and replicated: putting a simple return statement at the top of this Indexable_Link_Builder function build to bypass it. This solves the compatibility issues.
- I've read and understood the contribution guidelines.
- I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened.
When code customises a new post, in this case of type WooCommerce Product, custom attributes are lost when Yoast Indexable_Link_Builder function build resets the post.
Please describe what you expected to happen and why.
In this case, attributes were being added by default to a WooCommerce Product using the gist:
https://gist.github.com/Jon007/ae3a112659d6670ebbd2f26d55143773
which type of code has worked for many years and continues to work today on WooCommerce 5 until Yoast is updated to 15.8
I've tried other hooks without success.
How can we reproduce this behavior?
1.https://gist.github.com/Jon007/ae3a112659d6670ebbd2f26d55143773
Technical info
- If relevant, which editor is affected (or editors):
- Classic Editor
- Gutenberg
- Classic Editor plugin
Not relevant
- Which browser is affected (or browsers):
- Chrome
- Firefox
- Safari
- Other
Not relevant - php issue not browser issue
Used versions
- WordPress version: 5.6.2
- Yoast SEO version: 15.9
- Gutenberg plugin version:
- Classic Editor plugin version:
- Relevant plugins in case of a bug:
- Tested with theme: Storefront