WooCommerce 9.8.2 has been released
This release fixes issues with Checkout field validation and Coming Soon pages as well as clearing up PHP notices and addressing PHP 8.4 compatibility.
What’s in this release
- Fix deprecated function WCAdminHelper::is_store_page()
- Fix implicitly nullable parameters deprecation warnings
- Fix issue in which client side validation in checkout didn’t work
- Fix undefined variable warning when saving billing address
- Fix WooCommerce admin scripts loading on unrelated WP admin pages
- Fix – Store API – Move cart init and validation back within checkout route to avoid loading early
- Update – Ensure shipping calculations happen only when a full address has been provided
- Restore default margin in Product Collection block navigation links
Fix coming soon breaks other page
🛠️ Fix coming soon breaks other page (#57216)
This fix addresses an edge case error occurring when the checkout page is set to a non-default page. We were using page_slug
to match the coming soon page, but when the checkout page is set to a non-default page, the page_slug
to match the coming soon page is not correct. We’ve removed the slug check and only use the page ID to match the coming soon page which is more reliable.
Fix deprecated function WCAdminHelper::is_store_page()
🛠️ Fix deprecated function WCAdminHelper::is_store_page()
used (#57169)
WCAdminHelper::is_store_page()
has been deprecated in favor of WCAdminHelper::is_current_page_store_page()
since WC 9.8. This PR updates the the is_store_page()
calls in the LaunchYourStore
class to the new method to avoid deprecation warnings. The warning only appeared when admin users is on the store pages when store is in coming soon store only mode.
Fix implicitly nullable parameters deprecation warnings
🛠️ Fix implicitly nullable parameters deprecation warnings in PluginsHelper and CheckoutSchema (#57212)
Beginning with PHP 8.4, implicitly nullable parameters in function signatures (such as function f( int $x = null )
) will trigger a deprecation notice. Those parameters now have to be explicitly made nullable (i.e. function f( ?int $x = null )
). This fix makes the relevant code changes related to the PluginsHelper and CheckoutSchema functionality to reduce the amount of noise when running under this PHP version.
Fix issue in which client side validation in checkout didn’t work
🛠️ Cherrypick validate fields on checkout client for 9.8 (#57278)
We’ve fixed an issue in which Checkout validation for postal code and email would not work. This was only visible if you didn’t have additional fields installed.
Fix undefined variable warning when saving billing address
🛠️ Fix PHP warning when saving billing address (#57189)
We’ve cleared a PHP notice related to additional fields/edit account.
Fix WooCommerce admin scripts loading on unrelated WP admin pages
🛠️ Fix loading wc admin scripts on unrelated WP admin pages (#57186)
We’ve fixed a bug where the settings-deprecation
script is loaded on all admin pages without any condition, so all its dependencies are also loaded. This update adds a condition to check if the current page is an admin or embed page before loading deprecation scripts to ensure we only load the script on relevant pages.
Fix – Store API – Move cart init and validation back within checkout route to avoid loading early
⏪ Revert #55299 to handle sessions and cart tokens when the request is available (#57255)
We reverted some changes in 9.8 so that session is loaded when a WP_Rest_Request
object is available, rather than early during rest_api_init
.
Because of this change, validate_callback
under the checkout route needed some modifications so that it runs later still, has access to cart, and handles sanitized data since it no longer has access to the unsanitized values. This is to fix an inconsistent bug in WooPay where sometimes the session would not be loaded and cause an email validation error blocking checkout.
Update – Ensure shipping calculations happen only when a full address has been provided
🔄 Prevent shipping rates being hidden when fields are disabled in shipping calculator/checkout fields (#57176)
This PR consolidates shipping address handling between blocks and the legacy cart shortcode. needs_shipping()
and show_shipping()
are refactored to use the WC_Customer->has_full_shipping_address()
class method to see if a full shipping address has been provided.
WC_Cart_Totals
no longer checks show_shipping
, instead opting to just grab whatever has been calculated in the cart. Finally, the WC_Cart
class tracks if calculations have ran or not, so we no longer need to derive this from the Store API.
Restore default margin in Product Collection block navigation links
⏪ Fix: Remove Product Collection’s Store Notices wrapper #57275
After the markup of the Product Collection block was updated due to some changes in the Interactivity API, the default spacing between the product grid and the navigation links disappeared in some themes. We shipped a fix that addresses that and makes the Product Collection block to render as it used to.
Leave a Reply