How do you check in code whether HPOS is enabled?
AutomatticWooCommerceUtilitiesOrderUtil::custom_orders_table_usage_is_enabled().
questions
AutomatticWooCommerceUtilitiesOrderUtil::custom_orders_table_usage_is_enabled().
The woocommerce_after_order_object_save hook — it fires no matter where the order was saved from: admin, REST, checkout, CLI.
A class responsible for saving and reading a specific object type. The CRUD object doesn't know where its data lives. That's why HPOS could be introduced without changing the public API: only the order data store changed.
During the transition WooCommerce writes orders to both storages. You can roll back, and old plugins that read wp_posts still get data. After the transition sync is turned off because it doubles every write.
A denormalized table with a product's price, stock, SKU and rating. WooCommerce uses it for sorting and filters to avoid slow JOINs on wp_postmeta.
In the woocommerce_sessions table. The cookie holds only the session key. For a logged-in user the cart is also saved in user meta so it can be restored on another device.
WP-Cron depends on site visits and has no statuses or retries. Action Scheduler stores jobs in the database, runs them in batches and logs errors. Webhooks, analytics, some emails and migrations run on it.
Orders get their own tables with the needed columns and indexes (status, date, customer, total). No thousands of wp_postmeta rows per order and no heavy JOINs. Order search and reports don't compete with posts and pages.
It takes parameters in WooCommerce terms (price, stock_status, sku, visibility), builds the query itself and returns WC_Product objects. The code doesn't depend on how the data is laid out in tables.
No questions found. Try another search.