Fix for apearing same strikeout due to other plugin hooks

Fix for apearing same strikeout due to other plugin hooks

function woocommerce_get_price_html_woo_discount_on_sale_compatible($item_price, $product){
	$del_pattern = "/<del>(.*?)<\/del>/s";
	preg_match($del_pattern, $item_price, $matches);
	$del_content = isset($matches[1]) ? $matches[1] : '';
	$del_content = trim(strip_tags($del_content));
	$ins_pattern = "/<ins>(.*?)<\/ins>/s";
	preg_match($ins_pattern, $item_price, $matches);
	$ins_content = isset($matches[1]) ? $matches[1] : '';
	$ins_content = trim(strip_tags($ins_content));

	if(!empty($del_content) && !empty($ins_content)){
	  if($del_content == $ins_content){
		$item_price = '<span class="cart_price wdr_product_strikeout">';
		$item_price .= $ins_content;
		$item_price .= '</span>';
	  }
	}
	
	return $item_price;
}

add_filter('woocommerce_get_price_html', 'woocommerce_get_price_html_woo_discount_on_sale_compatible', 99, 2);