Contents
WooCommerce Integration — Plugixa Recipe
When WooCommerce is active, Plugixa Recipe Pro adds a native integration that lets you:
- Attach a recipe to a WooCommerce product (e.g., a sauce product’s “how to use it” recipe).
- Show a Recipe tab on the WooCommerce product page.
- Pull products as a content source in the
[plugixarecipe]shortcode (via a filter).
Requirements
- WooCommerce 7.0+
- Plugixa Recipe Pro license
Attaching a recipe to a product
Edit a WooCommerce product (Products → Edit product).
A Plugixa Recipe metabox appears in the sidebar. Pick one or more recipes. They’re stored as post meta (_plugixarecipe_recipe_ids) and surfaced on the product page.
The product recipe tab
The integration registers a new Recipe tab in the product page’s accordion (after Description, Additional info, Reviews). Clicking the tab reveals the attached recipe(s) rendered with the default view. If multiple recipes are attached, they’re rendered as a small grid.
Settings
Navigate to Settings → Display → WooCommerce.
- Enable product recipe tab — on/off toggle.
- Tab label — customize (“Recipe” / “How to use” / anything).
- Tab priority — reorder among other product tabs.
- Default view for the tab — usually a compact layout works best inside the tab.
Filtering products in the shortcode
You can pull WooCommerce products that have an attached recipe by filter:
add_filter('plugixarecipe_query_args', function ($args, $atts) {
if (!empty($atts['source']) && $atts['source'] === 'woo_products') {
$args['meta_query'] = [
[ 'key' => '_plugixarecipe_recipe_ids', 'compare' => 'EXISTS' ],
];
}
return $args;
}, 10, 2);
Related products based on recipes
Use recipe categories / cuisines to build product cross-sells:
add_filter('woocommerce_product_get_cross_sell_ids', function ($ids, $product) {
$recipe_ids = get_post_meta($product->get_id(), '_plugixarecipe_recipe_ids', true);
if (!$recipe_ids) return $ids;
// Find other products whose recipes share a category with this product's recipes.
return array_unique(array_merge($ids, your_cross_sell_logic($recipe_ids)));
}, 10, 2);
Schema output
When a recipe is attached to a product, the product’s JSON-LD is unchanged — the Recipe schema still lives on the /recipe/{id}/{slug}/ page, not on the product page. This avoids nested-schema confusion for Google.
Uninstalling
Deactivating the WooCommerce integration:
- Removes the product tab.
- Removes the metabox.
- Leaves
_plugixarecipe_recipe_idspost meta in place (non-destructive).
Re-activating later restores the linkage automatically — no data loss.
Troubleshooting
Tab doesn’t appear
- Ensure the Enable product recipe tab toggle is on.
- Check the product has at least one recipe attached.
- If you use a custom product template (theme override), ensure it calls
woocommerce_product_tabs.
Metabox isn’t showing
- Ensure the user has
edit_products+plugixa_recipe_editcapabilities. - Clear any admin-side cache (e.g., Query Monitor’s transient cache).