• Hy. Is it possible that the price in the form is no longer mandatory and can be hidden?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @iuda,

    Thank you for reaching out to us.

    Currently, it’s not possible to make the price optional or hidden in the plugin. However, I’ve passed your request to our development team for consideration in future updates.

    If you have any further questions, feel free to ask!

    Kind regards.

    Plugin Contributor Omar AlDabbas

    (@omardabbas)

    Hi @iuda,

    Can you please elaborate more about this? Since the plugin is about “offering a price”, why the price field should be optional or even not visible? What the customer is expected to submit in the form then?

    Omar

    Thread Starter Iuda

    (@iuda)

    This plugin can easy used as request a quote

    Plugin Contributor Birendra Maharjan

    (@aegkr)

    Hi @iuda,

    We’ve recently updated the plugin! You can now make the price field optional or hide it entirely by using these code snippets:

    To make the price field optional:

    // Remove 'required' from the price field.
    add_filter( 'alg_wc_po_form_field_price', function ( $data ) {
    $data['is_required'] = false;
    return $data;
    } );
    add_filter( 'alg_wc_po_accepted_price', function ( $price ) {
    return empty( $price ) ? true : $price;
    } );

    To hide the price field completely:

    // Remove the price field entirely.
    add_filter( 'alg_wc_po_form_field_price', '__return_false' );
    add_filter( 'alg_wc_po_accepted_price', '__return_true' );

    Please ensure that you update the plugin before adding this code. If you have any further questions, just let us know!

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.