The WooCommerce Conditional Content plugin lets you easily configure alerts, messages, advertisements and additional product content based on a set of rules that you configure to target specific conditions through out your store.
- Download the .zip file from your WooCommerce account.
- Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.
- Install Now and Activate the extension.
More information at: Install and Activate Plugins/Extensions.
Setup and Configuration
Create Content Blocks
The first step in creating conditional content is to create a content block with the content of your choosing. Conditional Content Blocks are created from the WooCommerce Menu -> Content Blocks. The interface is the same as creating a new post or other entry in the system. Choose Add New Content Block to get started writing your conditional content.
Use the Rules section to configure the conditions which must be met in order for the content to display. You can choose from the following rule types.
Single Product Output Rules ( these rules can only be used to show or hide content on a Single Product page, since they require data from the current product being viewed ).
- Specific Products – Choose what products this content should show up on.
- Product Types – Choose to display the content on all products which are of a particular type.
- Product in Categories – Choose to display the content on all products in a particular set of categories.
- Products with Attributes – Display the content on products that have specific attributes.
- Product Price Range – Content will display on products that are in this price range.
- Stock Status – Display the content on products that are in or out of stock.
- Stock Level Range – Display the content on products which have inventory in a particular range.
- Sale Start and End dates – Display the content when the product is on sale between these dates.
- Sale Status – Display when the product is or is not on sale.
General Output Rules – These rules can be used to further filter Single Product rules, or to define rules that show up else where on the site. Since these rules do not rely on product specific data, they can be used to configure content to show up anywhere on your store.