Home Forums WoodMart support forum Variable product price prefix

Variable product price prefix

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #512097

    roket.agency
    Participant

    Hello,
    I recently have turned on WoodMart option to hide “to” price.
    However when “to” price is hidden it is misleading to the customers. Is there a way to show a prefix for product prices to write “From” before the variable product price?

    I tried standard code for WooCommerce as shown below but it did not work. Maybe theme has workaround or planning to launch such function soon?

    Code:
    add_filter( ‘woocommerce_variable_price_html’, ‘custom_prefix_variable_product_price’, 10, 2 );

    function custom_prefix_variable_product_price( $price, $product ) {
    // Prefix text
    $prefix = ‘From ‘;

    // Check if it’s a product archive page
    if ( is_product_category() || is_product_tag() || is_shop() || is_post_type_archive( ‘product’ ) ) {
    // Add the prefix before the price
    $price = $prefix . $price;
    }

    return $price;
    }

    Thanks!

    #512329

    Hung Pham
    Keymaster

    Hi roket.agency,

    Thanks for reaching to us.

    There is no work around or options by default, we will consider this as a Feature request.

    Regards,

    #541820

    Mike
    Participant

    Hello,
    I will also suggest this as a feature, its important to have an option for prefix, because as it is now its confuse the customer if there are different prices for each variation, so it will be very useful to have a price like: from: 221,00€

    #542041

    Hung Pham
    Keymaster

    Hi,

    I suggest you leave a feature request on our form here: https://woodmart.canny.io/feature-requests , so other customers can vote for that and our developers will look into it.

    Thank you for your time.

    Regards,

Viewing 4 posts - 1 through 4 (of 4 total)