Php Del tag未按WooCommerce销售价格成交(仅限IE)
在WoodCommerce 2上,正在销售的产品在Php Del tag未按WooCommerce销售价格成交(仅限IE),php,mysql,css,woocommerce,Php,Mysql,Css,Woocommerce,在WoodCommerce 2上,正在销售的产品在标签中显示常规价格,然后显示销售价格(其本身位于标记中)。IE8在常规价格上显示了一个标记,然后在出售商品后的所有文本上重新应用(甚至到页脚)。只有常规项目应显示标记。所有其他浏览器都正确显示了这一点。它似乎位于class-wc-product-variation.php上。我看到对标签插入的引用: 公共函数get_price_html(){ if($this->price!=''){ 如果($this->price==$this->sale\
标签中显示常规价格,然后显示销售价格(其本身位于
标记中)。IE8在常规价格上显示了一个
标记,然后在出售商品后的所有文本上重新应用
(甚至到页脚)。只有常规项目应显示
标记。所有其他浏览器都正确显示了这一点。它似乎位于class-wc-product-variation.php上。我看到对标签插入的引用:
公共函数get_price_html(){
if($this->price!=''){
如果($this->price==$this->sale\u price&&&$this->sale\u price<$this->regular\u price){
$price=''.woocommerce\u price($this->regular\u price)。''.woocommerce\u price($this->sale\u price)。'';
$price=apply_过滤器('woocommerce_variation_sale_price_html',$price$this);
}elseif($this->price>0){
$price=woocommerce\u price($this->price);
$price=apply_filters('woocommerce_variation_price_html',$price$this);
}否则{
$price=_uuuu('Free!','woocommerce');
$price=apply_过滤器('woocommerce_variation_free_price_html',$price$this);
}
}否则{
$price=apply_filters('woocommerce_variation_empty_price_html',''$this);
}
返回$price;
}
我没有看到任何东西会让IE无法关闭
标签。我在WooCommerce的CSS文件中根本没有看到任何与
、
或行相关的内容
很明显,我的白内障在加班,我错过了一些明显的东西。任何人Bueller?生成的HTML是什么?大多数浏览器通过在认为合适的地方自动插入结束标记来弥补格式不良的HTML。有些人做得比其他人好。Cimmanon,我在Mac上,无法看到IE是如何解析它的。我收到一张截图,上面显示了删除的所有文本。不知道为什么当它在PHP中可见时,它认为没有结束标记。它在Safari、Chrome和Firefox上看起来不错。Safari使用封闭标签呈现HTML,FF和Chrome也是如此:From:$;79 $69
我尝试使用浏览器shots.org进行双重检查,但他们的屏幕截图在页面上显示的距离不够远。
if ( $this->price !== '' ) {
if ( $this->price == $this->sale_price && $this->sale_price < $this->regular_price ) {
$price = '<del>' . woocommerce_price( $this->regular_price ) . '</del> <ins>' . woocommerce_price( $this->sale_price ) . '</ins>';
$price = apply_filters( 'woocommerce_variation_sale_price_html', $price, $this );
} elseif ( $this->price > 0 ) {
$price = woocommerce_price( $this->price );
$price = apply_filters( 'woocommerce_variation_price_html', $price, $this );
} else {
$price = __( 'Free!', 'woocommerce' );
$price = apply_filters( 'woocommerce_variation_free_price_html', $price, $this );
}
} else {
$price = apply_filters( 'woocommerce_variation_empty_price_html', '', $this );
}
return $price;
}