Skip to content

Commit

Permalink
Added ENT_QUOTES in the html_entity_decode php function
Browse files Browse the repository at this point in the history
  • Loading branch information
therocket-gr committed Jan 17, 2024
1 parent 77fe7f2 commit 945c226
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,12 @@ protected function add_prices_in_posts( $posts ) {
foreach ( $posts as $key => $post ) {
$product = wc_get_product( $post['ID'] );
if ( $product !== false ) {
$posts[ $key ]['price'] = html_entity_decode( wp_strip_all_tags( wc_price( $product->get_price() ) ) );
$posts[ $key ]['price'] = html_entity_decode(
wp_strip_all_tags(
wc_price( $product->get_price() )
),
ENT_QUOTES
);
} else {
$posts[ $key ]['price'] = '';
}
Expand Down

0 comments on commit 945c226

Please sign in to comment.