This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Deprecate the woocommerce_shared_settings hook #4092
Merged
mikejolley
merged 2 commits into
trunk
from
update/deprecate-woocommerce_shared_settings
Apr 26, 2021
Merged
Deprecate the woocommerce_shared_settings hook #4092
mikejolley
merged 2 commits into
trunk
from
update/deprecate-woocommerce_shared_settings
Apr 26, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mikejolley
added
status: needs review
needs: dev note
PR that has some text that needs to be included in the release notes.
labels
Apr 22, 2021
Size Change: 0 B Total Size: 1.15 MB ℹ️ View Unchanged
|
Aljullu
approved these changes
Apr 22, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
github-actions
bot
added
status: ready to merge
and removed
status: needs review
labels
Apr 22, 2021
mikejolley
added
type: refactor
The issue/PR is related to refactoring.
type: technical debt
This issue/PR represents/solves the technical debt of the project.
labels
Apr 28, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
needs: dev note
PR that has some text that needs to be included in the release notes.
type: refactor
The issue/PR is related to refactoring.
type: technical debt
This issue/PR represents/solves the technical debt of the project.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is pulled from #3864 and closes #3748
This deprecates
woocommerce_shared_settings
with a notice. Tests have been updated to ignore warnings - we cannot test for the notice yet because WP tests do not support PHPUnit 9.x.How to test the changes in this Pull Request:
Add a filter somewhere, for example, main plugin file.
Visit the store.
Check the debug log:
Dev Note
Blocks surfaced a hook named
woocommerce_shared_settings
which could be used to change, add, or remove settings that are passed from the server to the client. This is now considered deprecated—a warning will be logged to the browser error console if used.We recommend instead using the Asset Data Registry directly, so for example:
Doing this lessons the risk of conflicting or overwriting data, since the filter allows any setting to be modified which could lead to unintentional side effects.
Changelog