In WooCommerce 11.1 and 11.2, we are focusing on performance optimizations for larger product catalogs. While this work prioritizes backward compatibility, some of the components involved were designed years ago and are structurally incapable of supporting the required performance improvements — the changes below outline what’s affected for extension developers and stores with customizations.
Product save
[Performance] Tune up caches invalidation during product save is optimizing the product save path by reducing unnecessary calls to WordPress term and meta APIs that clear caches on no-op writes (wp_set_object_terms() and delete_post_meta()).
As the product data stores now skip these calls when the stored value already matches, the optimization reduces per-save SQL count by up to 45%.
While technically, the contracts are preserved, changed set_object_terms hook invocation frequency can cause side effects. To verify your extensions and customizations for side effects this change could potentially cause, consider using AI tooling of your choice with the following prompt:
Search the active plugins, mu-plugins, and theme's functions.php for add_action('set_object_terms', ...) callbacks. For each match, check if the callback assumes it fires on every product save regardless of whether the product type changed. If so, the callback needs to be moved to a more appropriate hook (e.g., woocommerce_update_product or save_post_product).Product reordering
[Performance] Fix ordering products performance (N-query pattern) (take 2) and Product ordering: start legacy hooks deprecation cycle are replacing reorder algorithm and related hooks in order to support larger product catalog management.
Previously, when you reordered products under Products -> All Products -> Sorting, the complete catalog was reindexed. The new algorithm is designed to work with large catalogs and implements faster re-indexing and smarter (range-based) reordering.
The algorithm replacement required redefining customization and deprecating old hooks according to this table:
Using deprecated hooks will cause a fallback to the old unoptimized algorithm. Please reference the second PR for details.
| Hook | Status | Use-case |
woocommerce_after_single_product_ordering | Deprecated | Fired per product during catalog reindexing |
woocommerce_after_product_ordering | Deprecated | Fired once after reordering is completed. |
clean_post_cache | Unchanged | Fires per affected product on both legacy and fast paths. |
woocommerce_product_ordering_process_reindexed_products | New | Fires after a full catalog reindex. |
woocommerce_product_ordering_process_moved_products | New | Fires after products have been repositioned. |
Depending on the exact usage of the deprecated hooks, please consider using clean_post_cache, wp_ajax_woocommerce_product_ordering, woocommerce_product_ordering_process_reindexed_products, and woocommerce_product_ordering_process_moved_products as primitives for replicating the original behaviour.
Leave a Reply