WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Variable product price - changing "From:" (3 posts)

  1. rchowdhury
    Member
    Posted 8 months ago #

    Hi,

    I have variable products in my store and wanted to change the word "From:<min_price>" to "Price starting from:<min_price>". I want to change the same both in the shop page and the single product page. Basically the HTML <span class="from">From: </span> in shop page should get changed to <span class="from">Price starting from: </span>. Same in single product page.

    My site shop page is: http://www.frameit.in/product-category/photographs/
    Single product page is: http://www.frameit.in/product/rc1-1-0035/

    Any help will be greatly appreciated!

    Thanks.

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

  2. sleepymonk
    Member
    Posted 8 months ago #

    I found several threads similar to your request - maybe one of them will help you or at least point you in the right direction. Just keep in mind they may be older versions of WC

    http://wordpress.org/support/topic/manually-edit-from-price?replies=4

    http://wordpress.org/support/topic/plugin-woocommerce-excelling-ecommerce-delete-from-price

  3. rchowdhury
    Member
    Posted 8 months ago #

    Thanks! This code did it.

    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 = "Price starting from";
    $price = str_replace('From',$new_from,$price);
    return $price;
    }

Reply

You must log in to post.

About this Plugin

About this Topic