• Resolved pracko

    (@pracko)


    One of my ACF Views fields is a WooCommerce price field, and in the field’s Field Options settings, I have the word “Free” added to the Default Value field. “Free” is what I want displayed when the price of the product is left empty/blank. But this isn’t working. Nothing is being displayed when the WooCommerce price field is left empty inside the single product’s Product Data (Simple Product, Virtual) Regular Price field.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WPLake

    (@wplakeorg)

    Hi @pracko

    It’s an interesting problem you are facing, and we can confirm that it isn’t possible to display the default value for non ACF fields, i.e. WooCommerce. As we created our own method to reference these fields and get more flexibility from ACF Views.

    We will however include this in the next release.

    For now, you can modify the Template by including the ‘if’ condition of Twig to display your preferred “FREE” text when the price is empty.

    {% if regular_price.value is empty %}
     FREE
    {% endif %}
    Thread Starter pracko

    (@pracko)

    Awesome, thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Default Value Not Displaying’ is closed to new replies.