Ícone do produto

Conditional Content para WooCommerce

Show or hide store blocks and messages using WooCommerce cart, product, and customer rules. Cart messages can update on the same page.
Escolha uma opção de cobrança
$49
Economize 20%
$98 $78.40

A assinatura inclui

  • Melhorias e atualizações de produtos
  • Suporte ao cliente
  • Garantia de 30 dias para reembolso

Show the right message to the right shopper

Conditional Content for WooCommerce shows a message, a banner or a block when the rules you set match. Show a low-stock notice on a product page, a delivery note when certain items are in the cart, or a welcome back offer for returning customers. Watch the short demo to see it in the editor and on the storefront.

A Notice with the Info tone under the price on a product page.

Rules for products, carts, customers, pages and dates

Each content block carries its own rules. Rules in the same rule group must all match. Add a second rule group to show the content when either group matches.

  • Product. Category, brand, attribute, type, price, stock level, stock status, sale status and sale dates.
  • Cart. Cart total, cart quantity, and the products and categories in the cart.
  • Customer. Role, user, order history, total spent and days since the last order.
  • Page. A specific page, a post type, and single or archive views.
  • Schedule. Date, day of the week and time of day, in your site’s timezone.
  • Geography. The shopper’s country and the active WPML language.

The Rules box with two rule groups: Role is Customer and Product Category in Hoodies, or Sale Status is On Sale.

Messages that follow the cart

Tell a shopper their order qualifies for free gift wrapping the moment the cart reaches $100. A message with a cart rule, placed with the Conditional Content block, Display conditions or the shortcode, appears and leaves as shoppers add items, remove them or change quantities. The page stays where it is, and cached pages show each shopper the right message.

On the classic cart page, choose a location WooCommerce redraws, such as Before cart table, and the message updates with the cart.

A Notice with the Success tone above the cart when the cart total is $100.

Show or hide blocks with Display conditions

Save a group of rules as a Condition Set, then choose it in the Display conditions panel of a block in the Site Editor or the post editor. The block shows when the set matches. Turn on Hide when matched to show the block to everyone else.

Apply one Condition Set to as many blocks as you like. Edit the set once and every block that uses it follows the updated rules.

The Site Editor with a sale banner in the header selected, and the Display conditions panel showing the Sale page condition set and the Hide when matched toggle.

Ready-made styles for store messages

Give a content block a Notice, Outline, Callout or Banner style. Pick a Neutral, Info, Success or Warning tone, or enter a custom color to match your brand. A live preview shows the result as you choose, and the message keeps its look wherever it appears.

Notice, Outline, Callout and Banner styles showing the same free shipping message.

Fits block themes, classic themes and page builders

  • Block themes. The Conditional Content block places a content block anywhere in the Site Editor, or on a page or post.
  • Classic themes. Choose a WooCommerce location on the product, shop, cart, checkout, order received or mini-cart view.
  • Page builders and widgets. Paste the content block’s shortcode into a shortcode widget, a text widget or the classic editor. The shortcode is tested in Elementor’s Shortcode widget.
  • Custom templates. Print a content block at any action your theme runs, or with a template tag.

Pairs with Dynamic Pricing

Show an offer message or a pricing table under the same conditions as a Dynamic Pricing discount, so shoppers see the offer where it applies.

Built for developers who need to extend it

Register your own rule types and locations with filters. Ask a Condition Set from code with wccc_matches(), and print a content block from a template with woocommerce_conditional_content(). The documentation lists the hooks.

Requirements: WordPress 6.5 or later, WooCommerce 9.0 or later and PHP 7.4 or later.

Support tickets are answered by the Conditional Content developer.


Perguntas frequentes

Does it work with block themes and classic themes?

Yes. On a block theme, place the Conditional Content block in the Site Editor or add Display conditions to a block already on the page. On a classic theme, choose a WooCommerce location on the product, shop, cart, checkout, order received or mini-cart view.

Can I show or hide a block that is already on my page?

Yes. Select the block, open the Display conditions panel and choose a Condition Set. The block shows when the set matches. Turn on Hide when matched to show it to everyone else.

Can I edit one rule and update several blocks?

Yes. Apply the same saved Condition Set to each block through Display conditions. Edit the set in one place and every block using it follows the updated rules.

Can I show a message when the cart reaches a total?

Yes. Use the Cart Total Monetary Amount rule, such as is greater or equal to 100. A message placed with the Conditional Content block, Display conditions or the shortcode appears as the shopper updates the cart, on the same page.

Can I show a cart message when a specific product is added?

Yes. Choose Cart Products, select the product, and set the rule to contains at least 1. Use Cart Categories to check for items from a particular category.

Can I show a block only to wholesale customers?

Yes. Create a Condition Set with the Role rule and select your wholesale role. Choose the set in the block's Display conditions panel to show the block to customers in that role.

Can I show content to returning customers?

Yes. Customer rules read a logged-in customer's order history: Order Count and Status, Total Spent, Days Since Last Order and Ordered Product(s). Welcome back a customer who has spent $100, or show a care guide to buyers of one product.

Can I show a low-stock or sale message on product pages?

Yes. Stock Level and Stock Status rules read the product's inventory, and Sale Status and Sale Date rules follow its sale schedule. Place the message under the price, beside the add to cart button or on shop tiles.

Can I schedule content for a date or time?

Yes. Date, Day and Time rules show content from a start date, until an end date, on chosen days of the week or after a time of day. They follow your site's timezone.

Can I combine several rules?

Yes. Rules in the same rule group must all match. Add another rule group to show the content when either group matches.

Can I style the message to match my store?

Yes. Choose a Notice, Outline, Callout or Banner style and a Neutral, Info, Success or Warning tone, or enter a custom color. A live preview shows the result, and the message keeps its look wherever it appears.

Does it work with page builders?

Yes. Every content block has a shortcode, such as [woocommerce_conditional_content id="123"]. Paste it into any shortcode widget, text widget or classic editor page. The shortcode is tested in Elementor's Shortcode widget.

Does it work with page caching?

Yes. Content with a cart rule, placed with the Conditional Content block, Display conditions or the shortcode, is decided for each shopper after the page loads, so it works on cached pages. For other content, clear the page cache after you change a rule.

Can I show content by country or language?

Yes. The Country rule uses WooCommerce geolocation, and the WPML Language Code rule follows the active WPML language.

Does it work with Dynamic Pricing?

Yes. Show an offer message or a pricing table under the same conditions as a Dynamic Pricing discount, so shoppers see the offer where it applies.

Can developers extend it?

Yes. Register your own rule types and locations with filters, ask a Condition Set from code with wccc_matches(), and print a content block from a template with woocommerce_conditional_content(). See the documentation for the hooks.

What does it require?

WordPress 6.5 or later, WooCommerce 9.0 or later and PHP 7.4 or later.

How do I get help?

Questions before you buy go through the pre-sales form. After purchase, open a ticket from your WooCommerce.com account. Support tickets are answered by the Conditional Content developer.

Informações da extensão

  • Versão PHP necessária: 7.4
  • Testado com WordPress: 7.1
  • Testado com WooCommerce: 11.3
  • Requer pelo menos o WordPress: 6.5
  • Requer pelo menos o WooCommerce: 9.0

Países

  •  Em todo o mundo

Related Products

Preço: $279 Anualmente
Classificado com 3.9 de 5 estrelas
Preço: $29 Anualmente
Classificado com 3.7 de 5 estrelas
Preço: $119 Anualmente
Classificado com 3.5 de 5 estrelas
Preço: $49 Anualmente
Classificado com 2.7 de 5 estrelas
Preço: $109 Anualmente
Classificado com 4.6 de 5 estrelas
Preço: $49 Anualmente
Classificado com 3.9 de 5 estrelas
Preço: $79 Anualmente
Classificado com 3.4 de 5 estrelas
Preço: $59 Anualmente
Classificado com 3.1 de 5 estrelas
Preço: $109 Anualmente
Classificado com 2.8 de 5 estrelas
Uso dos seus dados pessoais
Nós e nossos parceiros processamos seus dados pessoais (como dados de navegação, endereços IP, informações de cookies e outros identificadores únicos) com base em seu consentimento e/ou nosso interesse legítimo para otimizar nosso site, atividades de marketing e sua experiência de usuário.