Support » Plugin: WooCommerce » Change the wording on the header to show multiple prices

Viewing 1 replies (of 1 total)
  • I have found a solution.

    Here is what I did:

    `add_filter( ‘woocommerce_variable_price_html’, ‘con_show_max_variation_price_only’, 10, product id );

    function con_show_max_variation_price_only( $price, $product ) {
    $prices = array( $product->get_variation_price( ‘min’, true ), $product->get_variation_price( ‘max’, true ) );

    if ($prices[0] == ‘9.99’) { echo “Digital: $”.$prices[0].” / year<BR>”; }
    if ($prices[1] == ‘19.99’) { echo “Print: $”.$prices[1].” / year<BR>”; }

    return $price;

    }

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.