脚本宝典收集整理的这篇文章主要介绍了php – 删除标题钩Woocommerce,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
<?PHP /** * woocommerce_single_PRoduct_summary hook. * * @hooked woocommerce_template_single_tITle - 5 * @hooked woocommerce_template_single_rating - 10 * @hooked woocommerce_template_single_price - 10 * @hooked woocommerce_template_single_excerpt - 20 * @hooked woocommerce_template_single_add_to_cart - 30 * @hooked woocommerce_template_single_Meta - 40 * @hooked woocommerce_template_single_sharing - 50 */ do_action('woocommerce_single_product_summary'); ?>
我想要的是删除woocommerce_template_single_title钩子,所以在我的functions.PHP文件中我编写了这段代码:
remove_action('woocommerce_single_product_summary','woocommerce_template_single_title',1);
但它不起作用,我不知道如何.
谢谢你的帮助
!编辑!!
没关系,我写下来解决了这个问题:
remove_action('woocommerce_single_product_summary',5);
优先级必须匹配
// Remove title hook Woocommerce remove_action('woocommerce_single_product_summary',5);
以上是脚本宝典为你收集整理的php – 删除标题钩Woocommerce全部内容,希望文章能够帮你解决php – 删除标题钩Woocommerce所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。