【发布时间】:2021-04-26 20:13:27
【问题描述】:
我正在学习 WooCommerce 开发。我安装了 pin checker 插件,它显示在添加到购物车按钮上方。截图在这里https://prnt.sc/xftmpn
现在我已经显示了引脚检查器下面的段落,我使用了下面的代码,但它显示在引脚检查器上方。
function action_woocommerce_single_product_pinchecker_content() {
echo "<span>Please enter PIN code to check delivery time & other more</span>";
}
add_action( 'woocommerce_single_product_summary', 'action_woocommerce_single_product_pinchecker_content', 28, 0 );
我可以用 jQuery 做到这一点,它正在工作,但我不想用 jQuery 做到这一点。
$('.pin_div').append("<span>Please enter PIN code to check delivery time & other more</span>");
【问题讨论】:
标签: php wordpress woocommerce product hook-woocommerce