WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » Change Text Before Product Price

Change Text Before Product Price

  • Some of the products I sell are sold in sets and others are individual. Is it possible to change the text before the price on specific products?

    Currently I’m using the following to change the text, but this applies to everything?

    /theme/functions.php

    add_filter(‘woocommerce_variable_price_html’,’custom_from’,10);
    add_filter(‘woocommerce_grouped_price_html’,’custom_from’,10);
    add_filter(‘woocommerce_variable_sale_price_html’,’custom_from’,10);

    function custom_from($price){
    $new_from = “Sets starting at”;
    $price = str_replace(‘From’,$new_from,$price);
    return $price;
    }

    Again my goal would be to have a ‘from price’ for certain products and a ‘set price’ for others.

    Your help or suggestions are appreciated.

    http://wordpress.org/plugins/woocommerce/

  • The topic ‘Change Text Before Product Price’ is closed to new replies.
Skip to toolbar