The WooCommerce development team announced today that they have started working on an implementation of custom tables for orders, a long-awaited improvement that promises significant performance gains for stores.
Adding custom tables for orders is a complex undertaking that will impact the entire ecosystem, so the team is soliciting feedback from the developer community as they proceed with the project.
When working with WooCommerce data, developers have been encouraged to use CRUD objects since they were introduced in version 3.0, as an alternative to directly updating metadata or using WordPress post objects.
“We still utilize wp_post
and wp_postmeta
table structures to store this information for WooCommerce stores even with the CRUD layer,” WooCommerce core developer Vedanshu Jain said.
“While these WordPress-provided APIs and tables have served us well over the years, we now want to take a step further with a rock-solid and easy-to-understand database structure that is intentionally designed for commerce needs.”
WooCommerce core developers have three primary objectives for introducing custom order tables – to improve scalability, simplicity, and reliability. They anticipate it will lessen the need for merchants to seek developer support when scaling their stores. Having orders in custom tables should also allow WooCommerce developers to extend core more easily, as well as create and restore data backups.
The WooCommerce development team is tracking the project on GitHub and is aiming to have an initial implementation ready by early Q3 2022. They have published the first draft of the database schema they are proposing for building out the custom tables and feedback is welcome on the post.
“For this project, we expect that some work may be required by extensions and custom code developers to take full benefit of the new table structure,” Vedanshu Jain said. “As we go further along in the implementation, we plan to publish upgrade guides to support the adoption of custom order tables.
“During the rollout, we aim to keep this feature strictly opt-in in the beginning, giving everyone enough time to make their shops compatible.”