WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to change the "From:" text that denotes the lowest available price for each particular product within the shop?

I'm asking this as, on our shop we offer A4 samples within the Wallpaper sections, and the program sees this as the lowest available price. However this is somewhat misleading.

So, is it possible to change this text to "A4 Sample:" Alternatively, is there away to add text. Either before the "From:" text, or to the end of the field, after the price?

If none of this is possible, is there a way to get the default price of products in the Wallpaper section to be that of the Rolls of Wallpaper?

share|improve this question
Can you provide more information. Website url? Are you using a specific Woocommerce theme? – Takanakui Jun 13 '13 at 15:17
Hi There, The template is Emporium, the site is not quite ready yet, but here's an example of the page: atadesigns-interiorshop.co.uk/product/… – Annette Taylor-Anderson Jun 13 '13 at 20:37
up vote 1 down vote accepted

You can use a filter to change the text or the min price, this will affect all variable products.

add_filter('woocommerce_variable_price_html', 'custom_price_text', 10, 2);

function custom_price_text( $price, $product ) {

         $price = '';
         $price .= '<span class="from">' . _x('A4 Sample', 'min_price', 'woocommerce') . ' </span>';        
         $price .= woocommerce_price($product->get_price());

         return $price;


share|improve this answer
This is the only variable product I will have on the site. Thank you for your help I will try this, that's great. – Annette Taylor-Anderson Jun 14 '13 at 6:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.