Publish and restore Product Add-On configurations
Staged publication lets a WooCommerce manager prepare changes without altering product pages immediately. Groups, reusable choices, and product-specific add-ons have an editable draft. Product pages, public APIs, carts, and checkout use only the last published revision.
Before you publish
- Save all intended fields, options, prices, availability, required settings, and assignments into the draft.
- Check the product or catalog scope shown in Publication.
- Coordinate catalog-wide publications with other WooCommerce managers.
- Add a short reason when it will help another manager understand the revision later.
Existing configurations remain active after upgrading. POM Tweaks preserves the first edited version as the initial published revision, so opening and saving a draft does not unexpectedly remove active add-ons.
Publish a group or reusable choice
- Go to Products → Product Add-Ons.
- Open a group or reusable choice and save the intended draft.
- In Publication, confirm whether the draft has unpublished changes.
- Expand Preview changes and review the published and draft values.
- Review the potential impact. Group impact identifies all-products, direct-product, and category scope. Reusable-choice impact reports the fields that reference it.
- Optionally enter a Publication reason.
- Select Publish draft.
The operation publishes the complete draft together. Customers cannot receive a mixture of two revisions during one request. After the database commit, POM advances the coherent publication generation and refreshes the product cache or assignment index when that aggregate requires it.
Publish product-specific add-ons
- Edit the product and open Product data → Add-Ons.
- Prepare its local fields, global exclusion, or individual excluded groups.
- Select Update once to save those changes as a draft, then return to Product data → Add-Ons.
- Review the unpublished-change preview under Publication.
- Select Publish the previously saved draft when the product is updated.
- Optionally enter a publication reason.
- Select Update for the product.
Leaving the publication checkbox clear saves the draft only. The publication checkbox always publishes the draft that was present when the editor loaded; any additional form edits in that same request are saved as the next draft. This prevents unreviewed browser changes from bypassing the impact preview.
Restore an earlier revision
- Open the group or reusable choice.
- Expand Revision history.
- Check the date, actor, reason, and generation of the earlier revision.
- Select Restore as new revision beside the required version.
Restoring never deletes or rewrites history. POM Tweaks copies the selected configuration into the draft and publishes it as a new latest revision. Existing carts and orders retain their stored add-on selections and prices; new product requests use the restored configuration.
For a product-specific revision, select Restore revision in Product data → Add-Ons, then update the product. Product revisions can also be reviewed, published, or restored by an authenticated management client through /wp-json/pom-tweaks/v1/product-add-ons/publications/{type}/{id}. A write sends operation as publish or rollback, an optional reason, the current optimistic revision, and source_revision_id for rollback. Stale or missing revisions return the same 409 or 428 response used by the other Product Add-Ons management endpoints.
Retention and history
POM Tweaks retains the latest 50 revisions per configuration by default, with a protected minimum of 5 and maximum of 200. Developers can adjust the retained count with pom_tweaks_product_addons_revision_retention. Cleanup runs after a successful publication and never removes the currently published revision.
History stores the WordPress user ID, UTC publication time, and optional reason. It does not copy email addresses or other profile details into the revision.
Verify a publication
- Save a visible label or price change without publishing and confirm a private product page still shows the previous value.
- Publish the draft and reload the product in a new request.
- Confirm classic REST and Store API show the same field UUIDs and new published values.
- Keep a cart line created before publication and confirm its stored selections and prices remain unchanged.
- Add the product again and confirm the new line uses the current published revision.
- Restore the earlier revision and confirm a new request uses it while both prior cart or order snapshots remain unchanged.
Troubleshooting
- If publication reports a conflict, reload the editor. Another request saved the aggregate after the page was opened.
- If publication is temporarily busy, wait a moment and retry. A short per-site publication guard prevents concurrent generations from overlapping.
- If the impact is larger than expected, do not publish. Correct the draft's all-products, category, direct-product, or reusable-choice references first.
- If a product still shows an older value, start a new request and confirm the intended draft was published rather than only saved.