Task
The table has quantity and stock status. WooCommerce needs 1 when the product is available and 0 when it is not.
Short answer
Create In stock?: default to 0; if stock_qty is greater than 0, set 1; if stock_status is in stock, also set 1.
How to Do It in Eofferix
- Open the settings of the output
In stock?column.
The click is on the settings icon of the output In stock?column. - In
Transformations, set0by default and add conditions by quantity and stock status.
The Transformationsblock shows the full rule chain for this case. - Save the column settings and go to the
Exportstep.
Before / After
Before
source data| SKU | Name | stock_qty | stock_status |
|---|---|---|---|
| WC-110 | Desk lamp | 12 | |
| WC-111 | Office chair | 0 | out of stock |
After
result| SKU | In stock? |
|---|---|
| WC-110 | 1 |
| WC-111 | 0 |