Support » Plugin: WC Fields Factory » Could not accept value 0

  • Resolved lili0allen


    Hi, I just realise no matter it’s a text field or select or radio button field, if the value is “0”, I cannot add that product into cart. Is this a bug?


    • This topic was modified 4 years, 9 months ago by lili0allen.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter lili0allen


    just want to clarify, this issue happens if the field is Required, and it would not allow “0” value.

    Plugin Contributor sarkparanjothi


    Hi @lili0allen,
    For validation we are used empty function we are miss understand it.
    This issue will be fix next version.

    Please follow the instruction: Go to plugins/wc-fields-factory/includes/wcff-validator.php

    open the file and find


    and replace with

    trim( $_val ) != “”


    Thread Starter lili0allen


    Thanks for your reply, mate. Actually I tried the same solution before. It resolves half of the issue, which I can add the product to cart even though the value is “0”. However, that “0” field won’t display as an attribute in the cart.

    For now, I just use CAPITAL letter “O” to replace value “0”. If you can solve display issue in cart, that would be awesome.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Could not accept value 0’ is closed to new replies.