facetwp out price html rather than just price for woocommerce in layout builder

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php

/** replace woocommerce “price” in layout builder with price/sale price html **/
add_filter( ‘facetwp_builder_item_value’, function( $value, $item ) {
if ( ‘woo/price’ == $item[‘source’] ) {
$product = wc_get_product( get_the_ID() );
$value = $product->get_price_html();
}
return $value;
}, 10, 2 );
{{/gist}}