instead now, it only shows “Contact for Quote.” It has not been this way, but when you add the product to the cart, the price shows up and allows you to checkout .. Just want to make sure this does not hinder a customers’ progress to purchase.
This topic has 3 replies, 2 voices, and was last updated 11 hours, 14 minutes ago ago by Luca Rossi
instead now, it only shows “Contact for Quote.” It has not been this way, but when you add the product to the cart, the price shows up and allows you to checkout .. Just want to make sure this does not hinder a customers’ progress to purchase.
I found the issue. I had a custom snippet in place;
/**
* @snippet Display “CUSTOM TEXT” if price “0” or empty – WooCommerce Single Product
* @how-to Display “CUSTOM TEXT” if price “0” or empty
*/
add_filter( ‘woocommerce_get_price_html’, ‘wooc_price_free_zero_empty’, 9999, 2 );
function wooc_price_free_zero_empty( $price, $product ) {
if ( ” === $product->get_price() || 0 == $product->get_price() ) {
$price = ‘Contact for Quote.‘;
}
return $price;
}
####
We have some products that do not have a price, but I want to display something .. Does this code need to be updated or improved.?
Dear @HUSSTLE,
We have reviewed the custom codes, and they look good.
Would you like to add anything else besides the text?
Best regards,
8Theme Team
You must be logged in to reply to this topic.Log in/Sign up