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
Pass some context information to woocommerce_blocks_hook_compatibility_additional_data
hook
#45156
Conversation
…additional_data hook which is a class name in which it was called
Hi @gigitux, @woocommerce/woo-fse Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Test Results SummaryCommit SHA: 1964059
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Thanks, @kmanijak, for working on this! While I may not be a PHP expert, I'd like to suggest considering the possibility of passing the entire instance of the class instead of just its name. This approach could offer developers greater flexibility and freedom in their implementations. Feel free to correct me if I'm mistaken, as my understanding of PHP might be limited. |
Hey folks! Just wanted to add my two cents to the discussion. Personally, I think it's best to avoid passing the object itself unless it's necessary. This is because it could potentially lead to issues with calling public methods on the same instance (e.g., the |
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.
Thanks, @xristos3490, for sharing your thoughts! LGTM!
Hi @webmandesign, wanted to let you know this PR was merged and the change will be available in WooCommerce 8.8! Thanks for nice suggestion in #44447! |
…ty_additional_data` hook (#45156) * Pass additional context to the woocommerce_blocks_hook_compatibility_additional_data hook which is a class name in which it was called * Add changelog * Lint fixes
Submission Review Guidelines:
Changes proposed in this Pull Request:
Closes #44447.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
/shop
ArchiveProductTemplatesCompatibility
(it can be repeated multiple times)SingleProductTemplateCompatibility
(it can be repeated multiple times)Example:
Changelog entry
Significance
Type
Message
Comment