Support » Plugin: Advanced Product Fields (Product Addons) for WooCommerce » Hide (+$0.00) in cart (or everywhere)?

  • Resolved sevans917

    (@sevans917)


    Hello,
    How can I suppress the output of price when I have the Adjust pricing set to “NO”? The addition of (+$0.00) only confuses customers.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sevans917

    (@sevans917)

    Sorry forgot to mention I see (+$0.00) on text fields, but not select fields.

    I have exactly the same problem.

    Disabling via CSS by display: none; is not possible since the (€0,00) is inside <p></p> tags.

    Awesome plugin btw! 🙂

    Open the class-fields.php in includes/classes folder and find the function
    value_to_string at line 444

    replace
    return sprintf('%s (%s)', self::sanitize_value($field,$raw_value), Helper::format_pricing_hint($field->pricing->type,$field->pricing->amount));

    with

    				if($field->pricing->amount > 0){
                       return sprintf('%s (%s)', self::sanitize_value($field,$raw_value), Helper::format_pricing_hint($field->pricing->type,$field->pricing->amount));
                    }else{
                       return sprintf('%s ', self::sanitize_value($field,$raw_value));
                    }
    Plugin Author Maarten Belmans

    (@maartenbelmans)

    @manesvenom Please note that suggesting to change core plugin files is not a good idea. With each update, they will be overwritten again.

    Hi Maarten,

    It is just my workaround, hopefully the next update would have an option to control the setting.

    Regards,

    Venom

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide (+$0.00) in cart (or everywhere)?’ is closed to new replies.