-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Add check for post_types key #33179 #33180
Conversation
Add check for post_types key
fa9b5b0
to
38f6ff0
Compare
📊 Test reports for this pull request have been published and are accessible through the following links:
Latest commit referenced in the reports: Visit the WooCommerce Test Reports homepage to view all published reports. See the FAQs page if you're having problems accessing them. |
Sorry for the short notice, @vedanshujain, but will you have some spare cycles to review this PR soon? We would like to request a Code Freeze Exception once it's approved if we still have time to get it included in WC core 6.6. There have been some reports about this fatal in the forums and the fix seems very safe and unlikely to cause regressions. |
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.
Looks good, guards against errors when $block_template
is null (and if it is a WP_Error
instance). Left a question regarding changelog, otherwise seems great!
Thanks for the review! I updated the PR (a59a23d) adding the changelog. Hope that it is fine 👍 |
Hi @barryhughes, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
* Update required WP version See https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/composer.json#L17 * Add check for post_types key #33179 Add check for post_types key * add changelog * Update changelog and readme for cherry-picked PR #33180 * Remove changelog file for cherry-picked PR #33180 * Update version to 6.6.0-rc.2 in woocommerce.php * Add woo install timestamp to server experimental assignment requests * Add changelog entry * Update changelog and readme for cherry-picked PR #33300 * Remove changelog file for cherry-picked PR #33300 Co-authored-by: Viktor Szépe <[email protected]> Co-authored-by: Luigi <[email protected]> Co-authored-by: Joshua Flowers <[email protected]>
This has been cherry-picked into the release branch |
This PR adds a check to be sure that we are checking an array. In this way, we can avoid a PHP warning.
All Submissions:
Changes proposed in this Pull Request:
Closes #33179.
How to test the changes in this Pull Request:
Check out this branch.
Quadrat
theme./wp-admin/post-new.php?post_type=product
)Warning: in_array() expects parameter 2 to be array, null given in /plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php on line 279
Other information:
pnpm nx changelog <project>
?FOR PR REVIEWER ONLY: