Files
WooBC/woo-business-central
Malin 2f11154fd7 feat: optionally create missing WooCommerce products from BC items
The plugin only ever updated existing WooCommerce products - nothing
created new ones, so a category-filtered sync would just skip every BC
item without a matching product, no matter how the filter was configured.

Adds an opt-in "Create Missing Products" setting (default off, so existing
update-only behavior is unchanged unless explicitly enabled) that creates
a bare WC_Product_Simple (name, SKU from GTIN/number, configurable
draft/publish status) for unmatched BC items in the category-filtered
sync path, then runs it straight through the existing update_product()
call for stock/price/brand - no duplicated logic.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 14:48:15 +02:00
..