This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Replace do_action_deprecated with the WC equivalent #5151
Merged
Merged
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
opr
added
status: needs review
type: bug
The issue/PR concerns a confirmed bug.
category: extensibility
Work involving adding or updating extensibility. Useful to combine with other scopes impacted.
focus: rest api
Work impacting REST api routes.
skip-changelog
PRs that you don't want to appear in the changelog.
labels
Nov 16, 2021
rubikuserbot
requested review from
a team and
mikejolley
and removed request for
a team
November 16, 2021 10:58
opr
added
the
status: blocker
Used on issues or pulls that block work from being released.
label
Nov 16, 2021
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
senadir
approved these changes
Nov 16, 2021
mikejolley
approved these changes
Nov 16, 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.
👍🏻 Just what I had in mind. Tested with and without subs active and confirmed the logs appear. Confirmed also that is_rest_request
in woo core works for StoreAPI too. 🚢
github-actions
bot
added
status: ready to merge
and removed
status: needs review
labels
Nov 16, 2021
Merging this PR as @senadir and @mikejolley approved it and all tests are passing. |
nielslange
pushed a commit
that referenced
this pull request
Nov 17, 2021
nielslange
added a commit
that referenced
this pull request
Nov 17, 2021
* Empty commit for release pull request * Fix state validation to compare state codes, and only validate if a country is given (#5132) * Only get valid states from wc if there is a country * Shared validation logic which uses keys * Fix 'Country is required' error on the Cart block when updating shipping address (#5129) * Fix error on the Cart block * Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook * Fix the country is required error on the Cart page using refs * Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls * Remove redundant check for customerDataToUpdate * remove use of refs in initial values Co-authored-by: Nadir Seghir <[email protected]> * Make order note block removable (#5139) * unforce order note * show block in inserter * Mini Cart block fatal error caused by append_script_and_deps_src (#5142) * Remove unused use statements * Fix types for $script * `get_script_from_handle` might return null so handle this case to prevent errors * Missing escaping * Replace do_action_deprecated with the WC equivalent (#5151) * Remove feature gate condition for Legacy Template block (#5158) * Update readme.txt * Update testing instructions * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Niels Lange <[email protected]>
nielslange
added a commit
that referenced
this pull request
Nov 17, 2021
* Empty commit for release pull request * Update readme.txt with release changelog * Add testing instructions for 6.3.0 release * Update testing instructions as MD tables didn't work * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update docs/testing/releases/630.md Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update readme.txt * Update release zip in testing note * Update testing instructions * Remove feature gate condition for Legacy Template block (#5158) * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt * Update testing instructions * Update testing instructions * Update release zip in testing note * Update testing instructions for SE templates * Update testing instructions for SE templates II * Update testing instructions * Bumping version strings to new version. * Release: 6.3.1 (#5169) * Empty commit for release pull request * Fix state validation to compare state codes, and only validate if a country is given (#5132) * Only get valid states from wc if there is a country * Shared validation logic which uses keys * Fix 'Country is required' error on the Cart block when updating shipping address (#5129) * Fix error on the Cart block * Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook * Fix the country is required error on the Cart page using refs * Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls * Remove redundant check for customerDataToUpdate * remove use of refs in initial values Co-authored-by: Nadir Seghir <[email protected]> * Make order note block removable (#5139) * unforce order note * show block in inserter * Mini Cart block fatal error caused by append_script_and_deps_src (#5142) * Remove unused use statements * Fix types for $script * `get_script_from_handle` might return null so handle this case to prevent errors * Missing escaping * Replace do_action_deprecated with the WC equivalent (#5151) * Remove feature gate condition for Legacy Template block (#5158) * Update readme.txt * Update testing instructions * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Michael P. Pfeiffer <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]>
nielslange
added a commit
that referenced
this pull request
Nov 18, 2021
* Empty commit for release pull request * Update readme.txt with release changelog * Add testing instructions for 6.3.0 release * Update testing instructions as MD tables didn't work * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update docs/testing/releases/630.md Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update readme.txt * Update release zip in testing note * Update testing instructions * Remove feature gate condition for Legacy Template block (#5158) * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt * Update testing instructions * Update testing instructions * Update release zip in testing note * Update testing instructions for SE templates * Update testing instructions for SE templates II * Update testing instructions * Bumping version strings to new version. * Empty commit for release pull request * Fix state validation to compare state codes, and only validate if a country is given (#5132) * Only get valid states from wc if there is a country * Shared validation logic which uses keys * Fix 'Country is required' error on the Cart block when updating shipping address (#5129) * Fix error on the Cart block * Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook * Fix the country is required error on the Cart page using refs * Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls * Remove redundant check for customerDataToUpdate * remove use of refs in initial values Co-authored-by: Nadir Seghir <[email protected]> * Make order note block removable (#5139) * unforce order note * show block in inserter * Mini Cart block fatal error caused by append_script_and_deps_src (#5142) * Remove unused use statements * Fix types for $script * `get_script_from_handle` might return null so handle this case to prevent errors * Missing escaping * Replace do_action_deprecated with the WC equivalent (#5151) * Remove feature gate condition for Legacy Template block (#5158) * Update readme.txt * Update testing instructions * Bumping version strings to new version. * Empty commit for release pull request * Update readme.txt * Add testing instructions * Add testing notes to README.md * Hide WooCommmerce block templates from Edit Post template dropdown (#5167) * Hide WooCommmerce block templates from Edit Post template dropdown * Add empty post_types value to template and update comments. * Legacy Template Block: Remove the deletion lock (#5166) Previously, our legacy template block was locked to prevent the users from removing it. The block could however be removed by erasing the parent, so this change allows the user to directly remove the block itself. Also: Closes #5163 Closes #5109 * Update release zip * Update release zip * Update testing instructions * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Michael P. Pfeiffer <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Tom Cafferkey <[email protected]> Co-authored-by: Lucio Giannotta <[email protected]>
jonny-bull
pushed a commit
to jonny-bull/woocommerce-gutenberg-products-block
that referenced
this pull request
Dec 14, 2021
jonny-bull
pushed a commit
to jonny-bull/woocommerce-gutenberg-products-block
that referenced
this pull request
Dec 14, 2021
* Empty commit for release pull request * Update readme.txt with release changelog * Add testing instructions for 6.3.0 release * Update testing instructions as MD tables didn't work * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update docs/testing/releases/630.md Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update readme.txt * Update release zip in testing note * Update testing instructions * Remove feature gate condition for Legacy Template block (woocommerce#5158) * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt * Update testing instructions * Update testing instructions * Update release zip in testing note * Update testing instructions for SE templates * Update testing instructions for SE templates II * Update testing instructions * Bumping version strings to new version. * Release: 6.3.1 (woocommerce#5169) * Empty commit for release pull request * Fix state validation to compare state codes, and only validate if a country is given (woocommerce#5132) * Only get valid states from wc if there is a country * Shared validation logic which uses keys * Fix 'Country is required' error on the Cart block when updating shipping address (woocommerce#5129) * Fix error on the Cart block * Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook * Fix the country is required error on the Cart page using refs * Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls * Remove redundant check for customerDataToUpdate * remove use of refs in initial values Co-authored-by: Nadir Seghir <[email protected]> * Make order note block removable (woocommerce#5139) * unforce order note * show block in inserter * Mini Cart block fatal error caused by append_script_and_deps_src (woocommerce#5142) * Remove unused use statements * Fix types for $script * `get_script_from_handle` might return null so handle this case to prevent errors * Missing escaping * Replace do_action_deprecated with the WC equivalent (woocommerce#5151) * Remove feature gate condition for Legacy Template block (woocommerce#5158) * Update readme.txt * Update testing instructions * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Michael P. Pfeiffer <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]>
jonny-bull
pushed a commit
to jonny-bull/woocommerce-gutenberg-products-block
that referenced
this pull request
Dec 14, 2021
* Empty commit for release pull request * Update readme.txt with release changelog * Add testing instructions for 6.3.0 release * Update testing instructions as MD tables didn't work * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update docs/testing/releases/630.md Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update readme.txt * Update release zip in testing note * Update testing instructions * Remove feature gate condition for Legacy Template block (woocommerce#5158) * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt * Update testing instructions * Update testing instructions * Update release zip in testing note * Update testing instructions for SE templates * Update testing instructions for SE templates II * Update testing instructions * Bumping version strings to new version. * Empty commit for release pull request * Fix state validation to compare state codes, and only validate if a country is given (woocommerce#5132) * Only get valid states from wc if there is a country * Shared validation logic which uses keys * Fix 'Country is required' error on the Cart block when updating shipping address (woocommerce#5129) * Fix error on the Cart block * Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook * Fix the country is required error on the Cart page using refs * Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls * Remove redundant check for customerDataToUpdate * remove use of refs in initial values Co-authored-by: Nadir Seghir <[email protected]> * Make order note block removable (woocommerce#5139) * unforce order note * show block in inserter * Mini Cart block fatal error caused by append_script_and_deps_src (woocommerce#5142) * Remove unused use statements * Fix types for $script * `get_script_from_handle` might return null so handle this case to prevent errors * Missing escaping * Replace do_action_deprecated with the WC equivalent (woocommerce#5151) * Remove feature gate condition for Legacy Template block (woocommerce#5158) * Update readme.txt * Update testing instructions * Bumping version strings to new version. * Empty commit for release pull request * Update readme.txt * Add testing instructions * Add testing notes to README.md * Hide WooCommmerce block templates from Edit Post template dropdown (woocommerce#5167) * Hide WooCommmerce block templates from Edit Post template dropdown * Add empty post_types value to template and update comments. * Legacy Template Block: Remove the deletion lock (woocommerce#5166) Previously, our legacy template block was locked to prevent the users from removing it. The block could however be removed by erasing the parent, so this change allows the user to directly remove the block itself. Also: Closes woocommerce#5163 Closes woocommerce#5109 * Update release zip * Update release zip * Update testing instructions * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Michael P. Pfeiffer <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Tom Cafferkey <[email protected]> Co-authored-by: Lucio Giannotta <[email protected]>
jonny-bull
pushed a commit
to jonny-bull/woocommerce-gutenberg-products-block
that referenced
this pull request
Dec 16, 2021
jonny-bull
pushed a commit
to jonny-bull/woocommerce-gutenberg-products-block
that referenced
this pull request
Dec 16, 2021
* Empty commit for release pull request * Update readme.txt with release changelog * Add testing instructions for 6.3.0 release * Update testing instructions as MD tables didn't work * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update docs/testing/releases/630.md Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update readme.txt * Update release zip in testing note * Update testing instructions * Remove feature gate condition for Legacy Template block (woocommerce#5158) * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt * Update testing instructions * Update testing instructions * Update release zip in testing note * Update testing instructions for SE templates * Update testing instructions for SE templates II * Update testing instructions * Bumping version strings to new version. * Release: 6.3.1 (woocommerce#5169) * Empty commit for release pull request * Fix state validation to compare state codes, and only validate if a country is given (woocommerce#5132) * Only get valid states from wc if there is a country * Shared validation logic which uses keys * Fix 'Country is required' error on the Cart block when updating shipping address (woocommerce#5129) * Fix error on the Cart block * Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook * Fix the country is required error on the Cart page using refs * Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls * Remove redundant check for customerDataToUpdate * remove use of refs in initial values Co-authored-by: Nadir Seghir <[email protected]> * Make order note block removable (woocommerce#5139) * unforce order note * show block in inserter * Mini Cart block fatal error caused by append_script_and_deps_src (woocommerce#5142) * Remove unused use statements * Fix types for $script * `get_script_from_handle` might return null so handle this case to prevent errors * Missing escaping * Replace do_action_deprecated with the WC equivalent (woocommerce#5151) * Remove feature gate condition for Legacy Template block (woocommerce#5158) * Update readme.txt * Update testing instructions * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Michael P. Pfeiffer <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]>
jonny-bull
pushed a commit
to jonny-bull/woocommerce-gutenberg-products-block
that referenced
this pull request
Dec 16, 2021
* Empty commit for release pull request * Update readme.txt with release changelog * Add testing instructions for 6.3.0 release * Update testing instructions as MD tables didn't work * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update docs/testing/releases/630.md Co-authored-by: Albert Juhé Lluveras <[email protected]> * Update readme.txt * Update release zip in testing note * Update testing instructions * Remove feature gate condition for Legacy Template block (woocommerce#5158) * Update testing instructions * Update testing instructions * Update testing instructions * Update readme.txt * Update testing instructions * Update testing instructions * Update release zip in testing note * Update testing instructions for SE templates * Update testing instructions for SE templates II * Update testing instructions * Bumping version strings to new version. * Empty commit for release pull request * Fix state validation to compare state codes, and only validate if a country is given (woocommerce#5132) * Only get valid states from wc if there is a country * Shared validation logic which uses keys * Fix 'Country is required' error on the Cart block when updating shipping address (woocommerce#5129) * Fix error on the Cart block * Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook * Fix the country is required error on the Cart page using refs * Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls * Remove redundant check for customerDataToUpdate * remove use of refs in initial values Co-authored-by: Nadir Seghir <[email protected]> * Make order note block removable (woocommerce#5139) * unforce order note * show block in inserter * Mini Cart block fatal error caused by append_script_and_deps_src (woocommerce#5142) * Remove unused use statements * Fix types for $script * `get_script_from_handle` might return null so handle this case to prevent errors * Missing escaping * Replace do_action_deprecated with the WC equivalent (woocommerce#5151) * Remove feature gate condition for Legacy Template block (woocommerce#5158) * Update readme.txt * Update testing instructions * Bumping version strings to new version. * Empty commit for release pull request * Update readme.txt * Add testing instructions * Add testing notes to README.md * Hide WooCommmerce block templates from Edit Post template dropdown (woocommerce#5167) * Hide WooCommmerce block templates from Edit Post template dropdown * Add empty post_types value to template and update comments. * Legacy Template Block: Remove the deletion lock (woocommerce#5166) Previously, our legacy template block was locked to prevent the users from removing it. The block could however be removed by erasing the parent, so this change allows the user to directly remove the block itself. Also: Closes woocommerce#5163 Closes woocommerce#5109 * Update release zip * Update release zip * Update testing instructions * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Michael P. Pfeiffer <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Nadir Seghir <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Tom Cafferkey <[email protected]> Co-authored-by: Lucio Giannotta <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
category: extensibility
Work involving adding or updating extensibility. Useful to combine with other scopes impacted.
focus: rest api
Work impacting REST api routes.
skip-changelog
PRs that you don't want to appear in the changelog.
status: blocker
Used on issues or pulls that block work from being released.
type: bug
The issue/PR concerns a confirmed bug.
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 PR will stop deprecated warnings being shown in API requests, previously having the warning print would cause the API request to be malformed and unreadable by the client.
Replacing
do_action_deprecated
withwc_do_deprecated_action
the error still gets printed to the debug log, just not in the response body.Testing
Automated Tests
Manual Testing
How to test the changes in this Pull Request:
WP_DEBUG
andWP_DEBUG_LOG
are true inwp-config.php
, or install https://wordpress.org/plugins/wp-debugging/__experimental_woocommerce_blocks_checkout_update_order_meta
and__experimental_woocommerce_blocks_checkout_order_processed
is shown.User Facing Testing
These are steps for user testing (where "user" is someone interacting with this change that is not editing any code).