PTK: Check if theres a scheduled action before logging warning.#51143
PTK: Check if theres a scheduled action before logging warning.#51143tjcafferkey merged 3 commits intotrunkfrom
Conversation
|
Hi @gigitux, @woocommerce/woo-fse Apart from reviewing the code changes, please make sure to review the testing instructions and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. You can follow this guide to find out what good testing instructions should look like: |
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit. |
gigitux
left a comment
There was a problem hiding this comment.
Thanks for the quick fix! The PR LGTM! I left a minor comment about the code comment, but feel free to merge as it is if you prefer!
Submission Review Guidelines:
Changes proposed in this Pull Request:
The previous implementation would log a warning every time the patterns were empty, which could happen frequently due to the asynchronous nature of pattern fetching. This led to:
By only logging when patterns are empty and no fetch is scheduled, we ensure that warnings are only generated in genuinely problematic situations, such as when the pattern fetching mechanism has failed entirely.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Before checking out this branch:
ptk_patternsAfter checking out this branch:
ptk_patternsChangelog entry
Changelog Entry Details
Significance
Type
Message
Changelog Entry Comment
Comment