Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 );

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>");
question from:https://stackoverflow.com/questions/65843843/how-to-use-the-custom-plugin-with-the-priority-order-number

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
169 views
Welcome To Ask or Share your Answers For Others

1 Answer

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>";
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...