No, It’s not working. In Woocommerce 3 Following method has been removed from plugin/woocommerce/includes/class-wc-product-variation.php
/**
* Get variation price HTML. Prices are not inherited from parents.
*
* @return string containing the formatted price
*/
public function get_price_html( $price = '' ) {
$display_price = $this->get_display_price();
$display_regular_price = $this->get_display_price( $this->get_regular_price() );
$display_sale_price = $this->get_display_price( $this->get_sale_price() );
if ( $this->get_price() !== '' ) {
if ( $this->is_on_sale() ) {
$price = apply_filters( 'woocommerce_variation_sale_price_html', '<del>' . wc_price( $display_regular_price ) . '</del> <ins>' . wc_price( $display_sale_price ) . '</ins>' . $this->get_price_suffix(), $this );
} elseif ( $this->get_price() > 0 ) {
$price = apply_filters( 'woocommerce_variation_price_html', wc_price( $display_price ) . $this->get_price_suffix(), $this );
} else {
$price = apply_filters( 'woocommerce_variation_free_price_html', __( 'Free!', 'woocommerce' ), $this );
}
} else {
$price = apply_filters( 'woocommerce_variation_empty_price_html', '', $this );
}
return apply_filters( 'woocommerce_get_variation_price_html', $price, $this );
}