Support » Plugin: WooCommerce » How to make regular price=0 show custom text like Price on Request

  • Hello,

    I would like to create a function where the price is set to “Price on Request” when the regular price is set to 0.

    I have read about how to make a blank space into SOLD.

    The code looks like this:

    
    add_filter('woocommerce_empty_price_html', 'custom_call_for_price');
    
    function custom_call_for_price() {
         return 'Call for price';
    }
    

    However I wish to also have an option for “Price on Request” by setting price to 0.

    I have previously used a plugin called WooCommerce Custom Price for this functionality: https://wordpress.org/plugins/woocommerce-custom-price/
    Unfortunately with the new Woocommerce 3.0.0 update, the functionality has stopped working.

    Is there somebody who could help me with a code that I could place in functions.php?

    Hope there is a nice soul out there! 🙂

    Kind regards,

    Marcus

    • This topic was modified 2 years, 7 months ago by MarcusFuto.
  • The topic ‘How to make regular price=0 show custom text like Price on Request’ is closed to new replies.