WordPress.org

Forums

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

  1. cdminc
    Member
    Posted 1 year 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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic