Variable Product Prices
-
Currently WooCommerce show the lowest price for a variable product. Is there a way to adjust this so that another price appears. Let me explain…
In the mattress industry it is standard to list the price of a queen size mattress. The lowest price is obviously the twin size. I would like to display the queen price first in my variable product. Thank you in advance for your help.
-
sure, you could just use the woocommerce_variable_price_html filter hook
Would you still want it to say from $___ or some other verbiage?
Hi bheadrick,
Thank you for your help. I’d like to change “from” to “queen”.This link might be helpful to others
https://gist.github.com/mikejolley/1600117Here is another link closer to what I am looking for. Now I just need to figure out how to select the “queen” size price variable. Any ideas?
http://wordpress.stackexchange.com/questions/102863/woocommerce-product-page-edit-from-text
If my product variation are Twin,Queen,King how would I display the “QUEEN” size using the code below:
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;
The topic ‘Variable Product Prices’ is closed to new replies.