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.
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
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!