Integrations
WooCommerce
Keep commerce extensions HPOS-safe and use the supported Blocks extension surfaces.
#Products and orders
Use WooCommerce CRUD objects rather than querying order posts, post meta, or custom tables.
$product = wc_get_product($productId);
$sku = $product ? $product->get_sku() : '';
$order = wc_get_order($orderId);
$order->update_meta_data('dispatch_note', sanitize_text_field($note));
$order->save();#High-Performance Order Storage
HPOS can store orders outside wp_posts. WooCommerce CRUD methods abstract the active datastore. Declare compatibility only after testing your complete extension.
#Cart and Checkout blocks
Use the Store API, documented filters, Slot/Fills, inner blocks, or IntegrationInterface. Classic shortcode hooks do not all run in block-based Cart and Checkout.
#Product editor
WooCommerce 11.0 removed the old block-based Product Editor beta. Product Editor v3 does not currently expose a stable public block API. Read the complete Product Editor and product blocks guide for the supported product-field workflow and a Single Product template block.