WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Change Text Before Product Price (1 post)

  1. cdminc
    Member
    Posted 7 months ago #

    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/

Reply

You must log in to post.

About this Plugin

About this Topic