WooCommerce / Product Table
Variable products can stay on one row with attribute dropdowns, or each variation can be its own row. If Name Your Price is active, the buy column also collects the amount.
variations | What the customer sees |
|---|---|
dropdown | One row for the parent. The buy cell lists each attribute, then Add to cart. This is the default. |
rows | One row per visible variation. Price, stock, SKU, and image come from that variation. A variation with no image uses the parent image. |
false | No selector and no per-variation row. The buy cell is a “Select options” link to the product page. |
Dropdowns only list attributes that are actually used on the variations. An out-of-stock variation cannot be added. If a variable product has no attributes, the cell falls back to “Select options”.
variation_name_format only changes the name column when variations="rows".
| Format | Example |
|---|---|
name_attributes | T-Shirt – Blue, Large. This is the default. |
name_only | T-Shirt |
attributes_only | Blue, Large |
[yh_wc_product_table variations="rows" variation_name_format="attributes_only" columns="image,name,att:color,att:size,price,stock,buy"]
The name still links to the parent product. Attribute columns such as att:color show that variation’s value, so you can use them beside attributes_only if the name itself should stay short.
When Name Your Price for WooCommerce is active, products with Name Your Price turned on get an amount control in the buy column, in front of Add to cart or the checkbox. There is no Product Table attribute to switch this on. It follows the product’s own Name Your Price setting.
On a phone, the amount field and Add to cart stay on the same line, after the attribute dropdowns.
[yh_wc_product_table columns="name,price,buy" variations="rows" quantities="true"]
variations="false" is set, or the product has no variation attributes to build dropdowns from.
Fix: Remove variations="false", or set variations="dropdown" or variations="rows". Confirm the product has at least one visible variation.
The amount is empty, below the minimum, above the maximum, or not one of the set prices.
Fix: Enter an amount inside the product’s rules. Set-price products have to use one of the dropdown values. The same rules apply when several checkbox rows are added together.
Name Your Price settings live on the parent. The variation row will not pick up a price saved only against the variation ID.
Fix: Set Name Your Price on the parent product. The table copies that parent setup onto each variation row and stores the typed amount on the cart line.