WooCommerce 10.1 brings updates to how sessions and cron jobs are managed. These changes are intended to improve both performance and reliability, but developers whose plugins interact with session storage, duration, or WooCommerce background jobs should review their integrations for compatibility.
The details
Starting in WooCommerce 10.1, scheduled for August 11th, 2025, sessions for logged-in users will be stored solely within the session table, just as it does for guest users, eliminating duplicate storage in the usermeta
table. Currently, session expiration is set to 7 days for logged-in users and 2 days for guest users by default. However, these durations can be extended through the wc_session_expiring
and
wc_session_expiration
filters, allowing plugins or themes to customize session lengths.
Sessions are now enforced by new maximum limits: sessions may persist for up to 30 days, and these values can be adjusted using the usual filters, but not beyond these new caps. If any filter attempts to extend sessions beyond this limit, the system automatically reduces it to 30 days and logs a warning message stating that longer sessions cause performance problems. These measures are aimed at preventing database growth issues resulting from excessive session retention.
Developers can now decide how guest sessions are merged into user sessions at login by using the new woocommerce_migrate_guest_session_to_user_session
filter.
Another major adjustment is the migration of all WooCommerce cron jobs to the Action Scheduler system, which enables more reliable execution and easier debugging. This replaces the legacy system, addressing issues such as missed or inconsistent cleanup jobs for sessions and unpaid orders.
How can I tell if this affects me?
These updates will affect you if your plugin modifies session expiration settings, depends on woocommerce_persistent_cart
in usermeta
, or interacts with WooCommerce’s cron job system.
Any session storage that exceeds the new limits will trigger a warning in the WooCommerce Status Logs (wc_session_handler
) which can be found under WooCommerce > Status > Logs.
What action should I take?
If your code interacts with these areas, review your integrations to ensure you’re not exceeding the new session limits or relying on woocommerce_persistent_cart
via usermeta
. Otherwise, no immediate action is required, but testing your extensions with WooCommerce 10.1 before launch is recommended to ensure compatibility.
Leave a Reply