Repository navigation
1.11.0
A Giorgio attribute-term order (the drag-and-drop order of pa_* terms) now actually reaches the storefront.
The mismatch
WooCommerce's REST API stores a term's menu_order in term meta order_pa_<slug>, while the storefront sorts "Custom ordering" attributes by term meta order — wc_get_product_terms, variation dropdowns, swatches. Every released WooCommerce up to 10.5 has this mismatch (fixed only in trunk), so the order Giorgio pushed landed in the database but the site kept showing the old one.
What 1.11.0 does
- New
OC_Giorgio_Attribute_Term_Orderhookswoocommerce_rest_insert_pa_*and copiesorder_pa_<slug>intoorderafter every REST create/update that carriedmenu_order— single items and every item of aterms/batchcall. The REST hook fires even when the value is unchanged, so a re-push from Giorgio always lands. - A request that does not carry
menu_order(a rename, for example) is skipped, so it cannot drag a stale REST value over an order set by hand in wp-admin.
One-time migration
On the first load after the update, every existing order_pa_* meta is mirrored into order, so orders pushed before this fix show up without a re-push. It runs once per site (option oc_storeos_term_order_mirrored, guarded by a 5-minute transient lock) and the result is written to the WooCommerce logs under source oc-storeos-integration.
Note: the migration is a one-way copy — on a term where someone reordered by hand in wp-admin after a Giorgio push, the Giorgio value wins. Giorgio is the source of truth for attribute order, so this is intended, but it is worth knowing if a store has hand-tuned an attribute recently.