• Resolved cousinr

    (@cousinr)


    Hi,
    how do I make it possible to add a suffix “from:” when selecting all options from a certain product category?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Josserand

    (@josserand)

    Hi,
    I’m not sure what you’re trying to do exactly.

    Do you want to keep the “From:” suffix when the final price of a variable product appears, after selecting all options?

    If so, this is not something this plugin will do.

    You could try to add it yourself by following what’s found here : https://www.businessbloomer.com/woocommerce-add-prefix-suffix-product-prices/

    Something like this:

    add_filter( 'woocommerce_get_price_html', 'bbloomer_add_price_prefix', 99, 2 );
    function bbloomer_add_price_prefix( $price, $product ){
    	if (strpos($price, "From") === false) {
    		$price = 'From: ' . $price;
    	}
    	return $price;
    }

    The hardest to do will be to add a bunch of conditions to only apply this to specific price HTML from a specific product category though

    Thread Starter cousinr

    (@cousinr)

    If it works with your plugin, that’s what I need! Thanks )

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add the ‘From:’ suffix to all selected prices for special product categories’ is closed to new replies.