You might want to show a “POA” price and/or a “Call for Price” button when you have a product with an empty price.

Many businesses require this, mostly real estate and wholesalers. So let’s see how it’s done 🙂

Price is now “POA” and a “Request Price” button shows @ WooCommerce Single Product Page

PHP Snippet: Display “POA” & Enquiry Button If Price Empty @ WooCommerce Single Product Page

Before taking a look at the snippet, make sure your “POA” product has no price (regular and sale price). Also, please reference to this other article if you want to add some Javascript to show/hide a Contact Form 7:

 * @snippet       Display "POA" for blank price products @ WooCommerce Single Product
 * @how-to        Get FREE
 * @author        Rodolfo Melogli
 * @testedwith    WooCommerce 3.8
 * @donate $9
add_filter( 'woocommerce_empty_price_html', 'bbloomer_poa_and_enquiry_cf7_woocommerce' );
function bbloomer_poa_and_enquiry_cf7_woocommerce() {
   $html = '<div class="poa">POA</div>';
   $html .= '<button type="submit" id="trigger_cf" class="single_add_to_cart_button button alt"> Request Price Now </button>';
   $html .=  '<div id="product_inq" style="display:none">';
   $html .= do_shortcode('[paste_your_contact_form_7_shortcode_here]');
   $html .=  '</div>';
   return $html;

Leave a Reply