WooCommerce Extension Development
A complete course in extending WooCommerce 11.2: HPOS and the CRUD layer, product types, cart and checkout, custom statuses, gateways and shipping an extension.
- Modules
- 02
- Lessons
- 06
- Reading time
- 3H 15M
- Words
- 10,510
What you will be able to do
- Read and write order data through the CRUD layer on HPOS and legacy storage alike.
- Add a custom product type with its own data, admin UI and pricing rules.
- Modify the cart and checkout with hooks that survive WooCommerce updates.
- Add an order status and the emails, reports and transitions that go with it.
- Integrate a payment gateway or shipping method without breaking the checkout.
- Ship an extension with REST endpoints, tests and a release process.
Before you start
Confident PHP, a working understanding of WordPress hooks and the plugin model, and WooCommerce 11.2 on a local WordPress 7.0 install.
Still being written
2 of 6 modules are finished and readable now. The remaining 4 are in progress and will appear here as they are published. Nothing already written is removed, and the lessons below will not change underneath you.
WooCommerce is not a plugin so much as a platform with its own data model, its own extension points and its own set of ways to break a store at checkout. The move to High-Performance Order Storage changed where order data lives, and a great deal of tutorial code still in circulation reads that data from the place it no longer is.
This course is written against WooCommerce 11.2 and WordPress 7.0. It starts with the architecture, because the CRUD layer is not a stylistic preference: bypassing it on an HPOS store returns nothing, silently. From there it works outward through products, cart, checkout, orders, payments and shipping, adding an extension point at each step rather than surveying them.
The checkout lessons deserve a warning: checkout is the highest-consequence code in the store. Every change in that module is taught with the failure mode attached, because the difference between an extra fee and a lost sale is usually one hook running at the wrong priority.
Curriculum
2 modules, 6 lessons
The WooCommerce architecture
Order storage and HPOS, the data store and CRUD layers, and why raw postmeta reads now return nothing.
3 lessons · 1H 35M
Products and pricing
Product types, custom product data, the product admin, pricing hooks and tax interaction.
3 lessons · 1H 40M
Go deeper