• warhedf1

    (@warhedf1)


    Hi there!
    I was wondering how I can hide the product price (right below the product title and short description) if the price equals $0.00?

    I’ve tried setting Dynamic Conditions to “Hide when condition met” and then Equals > $0.00. I’ve also tried Contains > $0.00 and, I’v also tried Less Than > $0.00 and none of those work/hide the price.

    I’m using the built-in Product Price widget in Elementor Pro to display the product price.

    Thoughts?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Same problem to me. I think is because in the compare type there is no option for a numeric value.

    I found this solution, for now. You have to add a filter on the function.php child theme:

    /**
    * @snippet Display FREE if Price Zero or Empty – WooCommerce Single Product
    * @how-to Get CustomizeWoo.com FREE
    * @author Rodolfo Melogli
    * @testedwith WooCommerce 3.8
    * @donate $9 https://businessbloomer.com/bloomer-armada/
    */

    add_filter( ‘woocommerce_get_price_html’, ‘bbloomer_price_free_zero_empty’, 9999, 2 );

    function bbloomer_price_free_zero_empty( $price, $product ){
    if ( ” === $product->get_price() || 0 == $product->get_price() ) {
    $price = ‘<span class=”woocommerce-Price-amount amount”>FREE</span>’;
    }
    return $price;
    }

    Hi
    Idem as @warhedf1
    I’m trying to hide a field if the product’s original price is 0.
    I tried all the combinations below:
    Dynamic Conditions / product price original to “Hide when condition met” and then: Equals to 0
    Equals to 0.00
    Equals to S/0.00

    It works fine when the price is empty and the condition is that price is empty.

    • This reply was modified 3 years, 11 months ago by espibutterfly.
    Plugin Author crazypsycho

    (@crazypsycho)

    Hello,

    when you enable debug mode, you should see, that the dynamic-tag-value did not only contain the price, it also contains some html-wrapper like this
    <span class="woocommerce-Price-amount amount"><bdi>0,00&nbsp;<span class="woocommerce-Price-currencySymbol">&euro;</span></bdi></span>

    In my example, I would check for contains <bdi>0,00&nbsp;

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide Product Price if $0.00 Astra/Elementor’ is closed to new replies.