Products are no longer showing the product price…

This topic has 3 replies, 2 voices, and was last updated 6 hours, 12 minutes ago ago by Luca Rossi

  • Avatar: HUSSTLE
    HUSSTLE
    Participant
    March 11, 2025 at 16:17

    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.

    Content is visible for topic creator and
    support staff only.
    2 Answers
    Avatar: HUSSTLE
    HUSSTLE
    Participant
    March 11, 2025 at 17:04

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

    Avatar: Justin
    Luca Rossi
    Support staff
    March 12, 2025 at 08:39

    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

  • Viewing 3 results - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.