WooCommerce extension development

WooCommerce extensions, block-checkout ready.

Custom extensions and payment gateways that work with HPOS, the Cart and Checkout blocks and the Store API, tested across WooCommerce, WordPress and PHP versions before they reach your store or the Woo Marketplace.

  • HPOSOrders in their own tables.
  • BlocksCart and Checkout blocks.
  • GatewaysPay, refund, reconcile.
  • TestedVersion matrix in CI.
Order storage

Built for High-Performance Order Storage

WooCommerce now keeps orders in their own tables instead of scattering them across post meta. Extensions that read the old way break or slow down. Ours use the order API.

Legacy posts: one order, many rows

wp_postmeta

01_billing_email02_billing_first_name03_billing_last_name04_billing_address_105_billing_city06_billing_postcode07_shipping_address_108_shipping_city09_order_total10_order_currency11_payment_method12_customer_user13_order_key14_paid_date

… plus more rows for every order

HPOS tables: one order, one row

wc_orders

idstatustotalemail
1048processing190.00buyer@…
billing and shipping

wc_order_addresses

ordertypecitypostcode
1048billingBristolBS1 5JG
1048shippingBristolBS1 5JG

Indexed columns: faster order searches and reports

// one line, in every extension we ship
FeaturesUtil::declare_compatibility(
  'custom_order_tables', __FILE__, true
);
HPOS explained

What HPOS changes for a WooCommerce extension

For years a WooCommerce order was a WordPress post with the type shop_order, and everything about it (the email, the address, the total) lived as separate rows in wp_postmeta. It worked, but it meant one busy store’s orders were sharing a table with every blog post, page and product, and searching orders meant joining that table against itself.

Read the detail: What HPOS changes for a WooCommerce extension

High-Performance Order Storage moves orders into their own tables: wc_orders, wc_order_addresses, wc_order_operational_data and wc_orders_meta. It has been the default for new stores since WooCommerce 8.2. Older stores can switch over in WooCommerce › Settings › Advanced › Features, with an optional compatibility mode that keeps both copies in sync while you test.

In extension code, anything that calls get_post_meta( $order_id, '_billing_email', true ), runs a WP_Query for shop_order posts or writes raw SQL against wp_posts is reading the old location. With sync on it may look fine. Turn sync off and it returns nothing, with no error.

“Declaring compatibility takes one line. The work is going through every place the plugin touches an order, and that’s the part people skip.”

How we think about HPOS work

Quick self-check

Open WooCommerce › Settings › Advanced › Features. If HPOS is greyed out, the page lists the plugins holding you back. That list is usually where an audit starts.

The three changes that make an extension HPOS-safe

Read and write

Use the order object: wc_get_order(), $order->get_meta(), $order->update_meta_data() then $order->save(). Query with wc_get_orders(), not WP_Query.

Admin screens

Order meta boxes register on wc_get_page_screen_id( 'shop-order' ), because the order edit screen is no longer the post editor.

Declare it

Call FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ) on before_woocommerce_init, so WooCommerce stops listing the plugin as incompatible.

Checkout comparison

Cart and Checkout blocks vs the classic shortcode checkout

The block checkout has been the default on new WooCommerce stores since 8.3. It’s a separate React app that talks to WooCommerce through the Store API, so the way an extension adds things to it is different all the way down.

What you want to doCart and Checkout blocksShortcode checkout
How the page is builtReact components in the browser, data from the Store API (/wc/store/v1)PHP templates rendered on the server, overridable from the theme
Add a checkout fieldAdditional Checkout Fields API: register the field in PHP and WooCommerce renders, validates and saves itwoocommerce_checkout_fields filter plus your own save hook
Add custom UISlot and fill components, or an inner block registered through the blocks integration interfaceAction hooks such as woocommerce_review_order_before_payment
Pass extra dataExtend Store API endpoints with your own namespaced schema dataRead $_POST during woocommerce_checkout_process
Payment gatewayGateway class plus a JavaScript payment method registered with the blocks registryGateway class extending WC_Payment_Gateway
Theme template overridesNot used. Styling goes through block settings and theme.jsoncheckout/form-checkout.php and friends
Old checkout hooksMost classic template hooks never fire, which is why fields “vanish” after switchingAll available

Our advice: if you’re starting fresh, build for blocks and keep the classic path only if your theme or another plugin forces it. If you’re already on the shortcode checkout and nothing’s broken, there’s no fire. But plan the move, because new checkout features land in blocks first.

Our process

Making an extension HPOS and block ready

Most of the work we’re asked for here is on an older plugin, often written by someone who has moved on, that needs to keep working on a modern store. This is the order we do it in.

  1. Audit every order touchpoint

    Search the code for get_post_meta on orders, shop_order queries, raw SQL on posts tables and classic checkout hooks. We write the list down so you can see the scope before we quote.

  2. Move data access to CRUD

    Swap each read and write to the order object and wc_get_orders(). Custom order data becomes order meta, saved through $order->save().

  3. Test with sync off

    We run the suite with HPOS on and compatibility mode off, since that’s the setting that exposes hidden post-meta reads. Then again on legacy storage.

  4. Rebuild the checkout parts

    Fields move to the Additional Checkout Fields API where it fits. Anything richer becomes a blocks integration with its own script, and data travels through the Store API.

  5. Declare both features

    Declare custom_order_tables and cart_checkout_blocks compatibility, update the readme’s “WC tested up to” and changelog.

  6. Release carefully

    Staging first, then production with a rollback ready. We watch new orders for the first few days and check the order notes as well as the error log.

Worked example · illustrative

“The new checkout lost our PO number field”

This is a made-up store, but it’s a very common shape. A B2B shop sells packaging to trade buyers. Years ago a developer added a “Purchase order number” field to checkout with woocommerce_checkout_fields, saved it with update_post_meta(), and added a “Pay by invoice” gateway.

The store moves to a block theme. The checkout page becomes the Checkout block. The PO field disappears, the invoice gateway doesn’t show at all, and the accounts team notices a week later when invoices go out without PO numbers.

The order we’d fix it in

Same day

Switch the checkout page back to the shortcode so orders carry PO numbers again. Stop the bleeding before refactoring anything.

Week 1

Register the PO field with the Additional Checkout Fields API, with validation. Move the saved value to order meta through the CRUD, so it also survives HPOS.

Week 1–2

Add a blocks payment method for the invoice gateway, limited to logged-in trade customers, and test both checkouts.

Week 2

Backfill PO numbers for the affected orders from the confirmation emails, then put the Checkout block back live.

Illustrative timeline, not a real client. Your audit sets the real one.

Payment gateways

Every order status, handled

A gateway is more than a card form. Here is what the order does for each outcome at the payment provider.

Outcome

Paid

  1. Pending payment
  2. Processing
  3. Completed
  4. Stock reduced

WebhookPayment provider confirms the charge; we verify the signature first.

Order noteTransaction ID saved on the order for support.

EmailsWooCommerce sends the normal order emails.

Outcome

Declined

  1. Pending payment
  2. Failed
  3. Stock untouched

RetryBuyer sees a clear message and can try another card.

Order noteDecline reason logged, no card data stored.

StockNothing reserved for a failed order.

Outcome

Refunded

  1. Processing
  2. Completed
  3. Refunded
  4. Stock restored

AdminRefund from the order screen, full or partial.

ProviderRefund sent to the provider through its API.

BooksRefund line ready for your accounting sync.

Marketplace QA

Tested on the versions your store runs

Every pull request runs the test suite across WooCommerce, WordPress and PHP versions in CI. That is also what Woo checks before an extension is listed on the Marketplace.

WooCommerce coding standardsSecurity scanHPOS compatibleBlocks compatibleDocs and changelog
Sample matrix. ✓ Tests pass. – Not supported by that release.
WC latestWC latest−1WC latest−2WP latestWP latest−1
PHP 7.4Not supported by that releaseTests passTests passNot supported by that releaseTests pass
PHP 8.0Tests passTests passTests passTests passTests pass
PHP 8.1Tests passTests passTests passTests passTests pass
PHP 8.2Tests passTests passTests passTests passTests pass
PHP 8.3Tests passTests passTests passTests passTests pass
Questions

About WooCommerce extensions

Anything else, ask on the audit call.

Ask an engineer

Not answered here? Ask on the free 30-minute audit call. An engineer replies within one business day.

Quick facts

  • Based in Delhi, India Working across time zones, with written weekly updates.
  • Fixed quote first Nothing is billed before you agree it.
  • You own it The code, workflows and accounts are yours.
  • Stores and ERPs Shopify, BigCommerce, WooCommerce and Adobe Commerce, with NetSuite, SAP Business One, Odoo and Dynamics 365.
See all questions
Is the extension compatible with HPOS?

Yes. Everything we build reads and writes orders through WooCommerce’s order APIs, never directly from the posts tables, and declares compatibility with High-Performance Order Storage.

Will it work with the block checkout?

Yes. We extend the Cart and Checkout blocks through the Store API and the blocks integration interface, and keep a fallback for stores still on the classic shortcode checkout when needed.

Can you build a payment gateway?

Yes: a gateway class for the classic checkout and a block-checkout integration, with refunds, webhooks from the payment provider and order notes that make support easy.

Can you list it on the Woo Marketplace?

Yes. We prepare the extension for Woo’s Marketplace review: coding standards, security scans, compatibility with recent WooCommerce, WordPress and PHP versions, and documentation.

Which versions do you support?

We test against the current and recent WooCommerce and WordPress releases and the PHP versions your hosting runs, and we add new releases to the test matrix as they ship.

Do we have to move to the block checkout?

No. The shortcode checkout still works and is still supported. New stores get the block checkout by default, and new checkout features tend to land there first, so we’d plan the move rather than rush it. What matters more is whether your extensions support blocks yet.

Why did a checkout field disappear after switching to the Checkout block?

Because it was almost certainly added with classic checkout hooks or template overrides, which the block checkout doesn’t use. The fix is to register the field through the Additional Checkout Fields API or a blocks integration, and save it as order meta.

Can HPOS be turned off again?

Yes, while compatibility mode is keeping the posts tables in sync you can switch between HPOS and legacy storage in WooCommerce settings. That’s why we test with sync off before a store commits to HPOS alone.

How do I know which plugins aren’t HPOS compatible?

WooCommerce lists them for you on the Features screen under Settings, Advanced. Plugins that haven’t declared compatibility show up there and block the switch.

Do you build WooCommerce plugins for WordPress.org as well as private use?

Yes, both. A plugin for WordPress.org goes through directory review. Private extensions for a single store skip that review entirely.

What does a WooCommerce extension audit cost?

It depends on the size of the plugin and how many order and checkout touchpoints it has. We start with a free 30-minute call, then send a fixed quote for the audit and a separate one for the fixes.

What should your
extension do?

Tell us the job, your checkout (blocks or classic) and your hosting. An engineer replies within one business day.

We save what you type here so we can follow up if you get interrupted.
One file, up to 10 MB: PDF, Word, Excel, CSV, text, PNG or JPG.

An engineer replies within one business day.

What happens next

  1. An engineer replies Within one business day, by email.
  2. A free 30-minute audit On a call with an engineer.
  3. A fixed quote It follows the audit. Nothing is billed before you agree it.
All app development

Get a quote. One form, one real reply.

Tell us what you are building or fixing. An engineer reads every request and replies within one business day, with a fixed scope, price and dates once we have talked.

Direct
[email protected]
Response time
Within one business day
Cost of asking
Nothing. The first 30-minute audit is free.

An engineer replies, not a form queue.