🤑 Black Friday Sale: 30% OFF for all plans. Coupon: BFD2022
Days
Hours
Minutes
Seconds
GET FREE VERSION GET THE PRO VERSION

Advanced Custom Fields ( ACF ) support

Learn about advanced integration with Advanced Custom Fields ( ACF ) plugin. Display custom fields values inside labels and use fields data as conditions for labels displaying.

In this article
Following article describes features available only with PRO plugin version.

Overview

Advanced Woo Labels PRO ( AWL ) comes with full support for Advanced Custom Fields ( ACF ) plugin. This means that all ACF plugin fields content can be displayed inside product labels. Also you can use any ACF field as a display condition for labels.

Plugin supports following fields types of ACF: Text, Text Area, Number, Email, URL, Password, Wysiwyg Editor, Image, File, Gallery, Link, Post Object, Page Link, Relationship, Taxonomy, User, Select, Checkbox, Radio Button, True / False, Google Map, Date Picker, Time Picker, Color Picker.

Labels text variables

Overview of ACF text variable usage

Inside any labels it is possible to set any custom text to display. Also it is possible to set some text variables that contain some information related to the current WooCommerce product. With text variables you can display inside label information like product price, stock status, discount value, etc.

Also when using ACF fields it is additionally possible to display the value of each ACF field that was created for WooCommerce products.

To display any of your ACF field value inside product labels please follow these steps:

1. Open any of your product labels edit pages.

2. Find Label text option ( available only with 'Shape with text' label type ).

Label text option

3. Set text variable. For example, if you want to display the value of your ACF field with name text, then use {ACF:text}.

Label text option with ACF text variable

4. Done! Now inside your shop current labels will display the value of text custom field ( it it exists ).

Label with ACF field value for current product

Note that you can use several text variables inside one label. And also combine text variables with some custom plain text.

Labels display conditions

Overview of ACF label display conditions usage

For each AWL plugin label it is possible to set display conditions that will describe when and where these labels must be visible. For example, we can display the labels only for products that have a certain category. Or only for products that are on sale. And so one.

With ACF plugin support additionally it is possible to set display conditions based on ACF fields value for each WooCommerce product.

How to set display condition based on ACF field:

1. Open any of your product labels edit pages.

2. Find Label conditions box and inside it choose ACF fields.

Label condition box with ACF rules group

3. As the second parameter choose any of the available ACF fields. For example, we can use select field.

4. Choose operator and field value. For example, we want to display current labels only for products that have a select field value equal to green.

Label condition based on ACF field value

5. Done! Now this label will be shown only for products that have ACF select field value equal to green.

The great power of label conditions is that you can combine them in AND and OR groups. So you can create complex and flexible logic behind label showing.