如何使用具有优先顺序编号的自定义插件? [英] How to use the custom plugin with the priority order number?
本文介绍了如何使用具有优先顺序编号的自定义插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在学习WooCommerce的开发.我安装了Pin Checker插件,该插件显示在添加到购物车"按钮上方.在此处 https://prnt.sc/xftmpn
I am learning WooCommerce development. I installed the pin checker plugin and that displays above the add to cart button. Screenshot here https://prnt.sc/xftmpn
现在,我已经在引脚检查器下面显示了一段,我使用了下面的代码,但是它显示在引脚检查器的上面.
Now I have displayed the paragraph below of the pin checker and I used the below code but it's displaying above the pin checker.
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.
I can do it with jQuery and it's working but I don't want to do it with jQuery.
$('.pin_div').append("<span>Please enter PIN code to check delivery time & other more</span>");
推荐答案
add_action( 'woocommerce_after_add_to_cart_form', 'mujuonly_before_add_to_cart_btn' );
function mujuonly_before_add_to_cart_btn() {
echo "<span>" . __( 'Please enter PIN code to check delivery time & other more<', 'woocommerce' ) . "/span>";
}
这篇关于如何使用具有优先顺序编号的自定义插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文