Add woocommerce_attributes_saved trigger. Closes #35004. #36943
Merged
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.
All Submissions:
Changes proposed in this Pull Request:
Introduce
woocommerce_attributes_saved
trigger in admin metabox. Explanation in #35004.Closes #35004.
How to test the changes in this Pull Request:
Setup:
pnpm run --filter='woocommerce/client/legacy' build
.This change results in a new browser event being triggered: this is for the benefit of 3PDs and nothing in WooCommerce Core takes advantage of it at present, therefore there isn't really anything tangible to test. So, our first goal should simply be to confirm we have not accidentally broken anything in the product editor:
Optionally, we can also perform some further tests to make sure the new event is available to 3PDs. Start by adding the following code (I suggest to a location such as
wp-content/mu-plugins/test-pr-36943.php
which you can remove after testing):With that in place:
Save Attributes
button.Other information:
pnpm --filter=<project> changelog add
?FOR PR REVIEWER ONLY: