bricks_create_woo_template
Overview
Creates a WooCommerce Bricks template for any WC page type. WooCommerce templates control the layout of shop pages, product pages, cart, checkout, account pages, and more.
Supports 17+ template types covering every WooCommerce page: from product archives and single product layouts to cart, checkout, thank-you, and all My Account sub-pages. Each template can have display conditions to target specific products, categories, or the entire site.
This is the foundation tool for building custom WooCommerce storefronts with Bricks Builder. Use it alongside the higher-level product and shop template tools for pre-built layouts.
Key Features
When to Use
You want to override default WooCommerce templates with Bricks-powered designs
You need different product page layouts for different product categories
You are building a complete WooCommerce storefront from scratch
You want to customize the checkout or My Account experience
Bricks Builder version 1.9 or higher
At least one WooCommerce product should exist for testing
WooCommerce pages (shop, cart, checkout) should be configured in WooCommerce settings
When NOT to Use
You are not using WooCommerce on the site
You want to edit an existing WC template — use bricks_update_template_content instead
Parameters
Warning: Undefined array key "param_enum_values" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 28
typestring (enum)REQUIREDWarning: Undefined array key "param_enum_values" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 28
titlestringREQUIREDWarning: Undefined array key "param_enum_values" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 28
contentobjectoptionalnullWarning: Undefined array key "param_enum_values" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 28
conditionsarray of objectsoptional[]Code Examples
Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12
Create a custom single product template
Creates a WooCommerce product template with a condition targeting all products.
bricks_create_woo_template({
type: "wc_product",
title: "Modern Product Page",
conditions: [
{ main: "postType", postType: ["product"] }
]
})Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12
Create a custom checkout template
Creates a checkout form template applied to the entire site.
bricks_create_woo_template({
type: "wc_form_checkout",
title: "Custom Checkout",
conditions: [
{ main: "any" }
],
content: {
type: "section",
ref: "checkout-section",
children: [{
type: "container",
children: [
{ type: "heading", settings: { tag: "h1", text: "Checkout" } },
{ type: "woo-checkout-form", ref: "checkout-form" }
]
}]
}
})Common Mistakes
Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935
Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48
Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935
Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48
Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935
Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48
Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Tips & Warnings
Tip: For quick product or shop page creation, prefer bricks_create_woo_product_template or bricks_create_woo_shop_template which pre-build complete layouts with gallery, price, add-to-cart, filters, and pagination.
Tip: Use bricks_woo_status first to verify WooCommerce is active and see existing WC templates. Use bricks_woo_elements to list all available WC-specific Bricks elements.
Warning: Only one template per type can be active at a time (the one with the most specific conditions wins). If you create a new product template, it may override an existing one depending on condition specificity.
Warning: Requires WooCommerce plugin to be installed and active. The tool will fail if WooCommerce is not detected.