variationen Endpunkt korrektur#238
Closed
Avatarsia wants to merge 2 commits intoOpenXE-org:masterfrom
Closed
Conversation
…export Categories belong to the parent product in WooCommerce, not to variations. Use $category_product_id (parent ID for variants, product ID for simple products) for both GET and PUT category operations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Variable products (type=variable) in WooCommerce manage stock on the variation level, not the parent. When a parent product is detected, fetch all variations and set stock_quantity on each one individually. Also exposes product type from getShopIdBySKU() for downstream logic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded by #266 — die Batch-Stock-Sync-Refactorisierung ersetzt Closing to avoid duplicate implementations of the same code path. |
Avatarsia
pushed a commit
to Avatarsia/OpenXE
that referenced
this pull request
Apr 21, 2026
PR OpenXE-org#266 (feature/woocommerce-batch-stock-sync) rewrites ImportSendListLager onto products/batch + variations/batch and therefore covers the variation support of OpenXE-org#238 as a strict superset — with a 100x reduction in request count on top. Keeping both in the manifest produced a semantic conflict on the stock sync code path during Pass 2. Upstream PR OpenXE-org#238 was closed with a superseded-by note. If upstream still chooses to merge OpenXE-org#238 first, the production rebuild can be reverted by adding the line back.
Avatarsia
pushed a commit
to Avatarsia/OpenXE
that referenced
this pull request
Apr 21, 2026
PR OpenXE-org#266 (feature/woocommerce-batch-stock-sync) rewrites ImportSendListLager onto products/batch + variations/batch and therefore covers the variation support of OpenXE-org#238 as a strict superset — with a 100x reduction in request count on top. Keeping both in the manifest produced a semantic conflict on the stock sync code path during Pass 2. Upstream PR OpenXE-org#238 was closed with a superseded-by note. If upstream still chooses to merge OpenXE-org#238 first, the production rebuild can be reverted by adding the line back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zusammenfassung
WooCommerce-Produktexport schlug mit 404-Fehler fehl, wenn Produktvarianten aktualisiert werden sollten. Die WC REST API erfordert für Varianten den Endpunkt
/products/{parent_id}/variations/{id} statt /products/{id}.
Änderungen
Lagerbestand, Status) übertragen — Name, Beschreibung etc. werden vom Parent vererbt.
Hintergrund
Betroffen waren alle Varianten-Artikel beim Shop-Export. Einfache Produkte waren nicht betroffen. Die Fehlermeldung von WooCommerce war:
▎ Um Produktvarianten zu bearbeiten, sollten Sie den Endpunkt /products/<product_id>/variations/ verwenden.