Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix structured data blocks deprecation warning #17999

Merged

Conversation

Djennez
Copy link
Member

@Djennez Djennez commented Jan 27, 2022

Context

  • Provides a fix for a deprecation message from WordPress 5.8

Summary

This PR can be summarized in the following changelog entry:

  • Fixes a bug where a (debug) deprecation message would show in the widget editor on WordPress 5.8 and above.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Install and activate Yoast Free on WordPress 5.8 or above.
  • Make sure debugging is active (add to wp-config.php: define( 'WP_DEBUG', true ); and define( 'SCRIPT_DEBUG', true );)
  • Navigate to Appearance -> Widgets
  • Notice the PHP Notice: wp_enqueue_script() ...
  • With this PR, that message won't show.

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

  • Make sure the FAQ block keeps functioning as expected on posts and pages.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo] and I have added test instructions for Shopify.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.

Fixes #17275
Fixes https://yoast.atlassian.net/browse/IM-505

@Djennez Djennez added the changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog label Jan 27, 2022
@Djennez Djennez added this to the 18.2 milestone Jan 27, 2022
@Djennez
Copy link
Member Author

Djennez commented Jan 27, 2022

Tested ✅

@Djennez Djennez merged commit 644ca80 into trunk Jan 27, 2022
@Djennez Djennez deleted the IM-505-fix-deprecation-warning-structured-data-blocks branch January 27, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP Notice on Widgets screen when upgrading to WordPress 5.8
1 participant