Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在woocommerce产品中更改html,但现在没有节省价格_Php_Html_Css_Wordpress_Woocommerce - Fatal编程技术网

Php 在woocommerce产品中更改html,但现在没有节省价格

Php 在woocommerce产品中更改html,但现在没有节省价格,php,html,css,wordpress,woocommerce,Php,Html,Css,Wordpress,Woocommerce,因此,我在商店里有现在的产品,可以通过自定义html来节省价格。 现在我需要在没有这些属性的情况下更改产品价格,这些属性只有一个价格(常规价格) 问题是它们有相同的类,并且由于某种原因,当我更改html时,只有was now save类得到了更改,但正常价格的产品没有 add_filter('woocommerce_get_price_html','bbloomer_simple_product_price_format',10,2); 功能bbloomer\u简单产品\u价格\u格式($pri

因此,我在商店里有现在的产品,可以通过自定义html来节省价格。 现在我需要在没有这些属性的情况下更改产品价格,这些属性只有一个价格(常规价格)

问题是它们有相同的类,并且由于某种原因,当我更改html时,只有was now save类得到了更改,但正常价格的产品没有

add_filter('woocommerce_get_price_html','bbloomer_simple_product_price_format',10,2);
功能bbloomer\u简单产品\u价格\u格式($price,$product){
$str=“Ušteda:”;
如果($product->is_on_sale()&&&$product->is_type('simple')){
$price=sprintf
  • MP cena:%1$s
  • 。$str.%3$s
  • Cena:%2$s
    • ,“woocommerce”)、wc_价格($product->get_regular_price())、wc_价格($product->get_sale_price())、wc_价格($product->get_regular_price())、wc_价格($product->get_sale_price()); } 返回$price; }
    发送屏幕截图。我的意思是,你能告诉我们你的屏幕截图问题吗?你到底在找什么?正如我所说,这两个是同一个类,我不能在第一个类中添加自定义html,只能在第二个类中添加自定义html