Adding Costs to Products
You can add Cost of Goods (COG) to products individually.
Simple Products

- Edit a product in WooCommerce.
- In the Product data metabox, go to the General tab.
- Find the Cost of Goods by PixelYourSite section.
- Select the type: Fix or Percent.
- Enter the cost value.
- The plugin will display the estimated Profit based on the current price.
Variable Products

- Edit a variable product.
- Go to the Variations tab.
- Expand a specific variation.
- Enter the Cost of Goods type and value for that specific variation.
Category-Based Costs

If a product has no specific cost, the plugin checks its category.
- Go to Products > Categories.
- Add or Edit a category.
- Enter the Cost of Goods type and value.
- This value applies to all products in this category that do not have their own cost set.
How “Cost” is used
For every order, the plugin calculates:
- Item Cost = (Cost per product/variation) × (Quantity)
- Order Cost = sum of all item costs (plus shipping cost, if you enabled it)
- Profit = Order Total − Order Cost
(and “Order Total” can be with tax or without tax, depending on your Tax rule setting)
Cost fallback logic (what value gets used)
When the plugin needs a cost for an order item, it looks for it in this order:
- Variation cost (highest priority)
- If the customer buys a variation and that variation has its own Cost, that’s the one used.
- Parent product cost
- If the variation has no cost set, the plugin checks the main variable product cost (the parent).
- Category fallback cost
- If there’s no product-level cost, the plugin checks if the product’s category has a default cost rule.
- Global rule (last resort)
- If none of the above exists, the plugin applies your Global rule from WooCommerce → Settings → Cost of Goods by PixelYourSite.
Example (what happens in real life)
- You sell a T-shirt variation “Size L” with no variation cost set
- The parent product has Cost = 8 → the plugin uses 8
If the parent product also has no cost, but the category “Apparel” has a Cost = 6, it uses 6.
If the category has no rule either, it uses the Global rule (ex: 20% or Fix 5).