更新时间:2023-12-02 08:37:34
刚提交这个我就有了一个想法,所有的钩子都是函数,所以我创建了一个新函数并包含了产品描述代码:
Just after submitting this I had an idea, all of the hooks are just functions so I created a new function and included the product description code:
function woocommerce_template_product_description() {
woocommerce_get_template( 'single-product/tabs/description.php' );
}
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_product_description', 20 );
由于最新版本的 woocommerce 这段代码应该仍然像这样工作
since latest versions of woocommerce this code should still work like so
function woocommerce_template_product_description() {
wc_get_template( 'single-product/tabs/description.php' );
}
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_product_description', 20 );`