• Resolved emoncht

    (@emoncht)


    How can I show variation price inside swatch? I know there is no option. But can you write me a code with hooks to show the price inside the box.

    add_filter( 'vtwpr_swatch_html', 'add_price_to_swatch', 10, 2 );function add_price_to_swatch( $html, $product ) {    if( $product->is_type( 'variation' ) ){        $price_html = $product->get_price_html();        $html .= '<span class="price">'. $price_html .'</span>';    }    return $html;}

    Have I done something wrong?

Viewing 1 replies (of 1 total)
  • Plugin Support angelagrey

    (@angelagrey)

    Hello,

    Thank you for reaching out to us.

    We’ll add this in the future updates. For now I’m afraid we can’t do it instantly, as our devs are caught up in another project. Hopefully the update will be released soon.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Show variation price Inside Swatch box’ is closed to new replies.