feat: variant wizard now creates AND updates existing WC variations

Already synced variants are editable — change price, SKU, image and click
Save & Sync to update them on WooCommerce. New variants are created,
existing ones updated in a single action. Button shows on all products
with variants (purple for new, grey for already synced).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-01 18:10:07 -04:00
parent 1bf4092b39
commit 8983c8bd50
3 changed files with 105 additions and 25 deletions

View File

@@ -22,8 +22,9 @@
<separator string="Variants to Push"/>
<div class="alert alert-info" role="alert">
Review and edit each variant's pricing, SKU, and image before pushing.
Uncheck "Include" to skip a variant. Already synced variants are shown for reference.
Review and edit each variant's pricing, SKU, and image.
New variants will be created, already synced variants will be updated.
Uncheck "Include" to skip a variant.
</div>
<field name="line_ids">
@@ -44,7 +45,7 @@
</sheet>
<footer>
<button name="action_push" type="object"
string="Push Variants to WooCommerce" class="oe_highlight"
string="Save &amp; Sync to WooCommerce" class="oe_highlight"
icon="fa-cloud-upload"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>