Woocommerce产品所有产品的默认说明 [英] Woocommerce Product Default Description for All Products

查看:174
本文介绍了Woocommerce产品所有产品的默认说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以为所有产品页面添加Woocommerce产品默认描述。那应该是图像或注释文本。并且我希望将其放置在描述文本的上方或底部。

Is this possible to add Woocommerce Product Default Description for All Products page. That should be image or Note text. And I want It will be put in above or bottom of the description text.

在此先感谢

推荐答案

您可以使用

// define the woocommerce_single_product_summary callback function
function my_custom_action() { 
    echo '<p>This is my custom action function</p>';
};     
add_action( 'woocommerce_single_product_summary', 'my_custom_action', 15 );


woocommerce_after_single_product_summary

or woocommerce_after_single_product_summary

// define the woocommerce_after_single_product_summary callback 
function action_woocommerce_after_single_product_summary( $evolve_woocommerce_after_single_product_summary, $int ) { 
    // make action magic happen here... 
}; 

// add the action 
add_action( 'woocommerce_after_single_product_summary', 'action_woocommerce_after_single_product_summary', 10, 2 );  

或woocommerce_before_single_product_summary

or woocommerce_before_single_product_summary

// define the woocommerce_before_single_product_summary callback 
function action_woocommerce_before_single_product_summary( $woocommerce_show_product_sale_flash, $int ) { 
    // make action magic happen here... 
}; 

// add the action 
add_action( 'woocommerce_before_single_product_summary', 'action_woocommerce_before_single_product_summary', 10, 2 );

,或者您也可以直接在woo-commerce文件上进行更改。

or you may also change direct on woo-commerce files.

这篇关于Woocommerce产品所有产品的默认说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆