I am trying to add a custom text on the checkout form
I have used the following hook but the message actually ended up on top of the product and not after the cart contents And it appeared twice
add_action('woocommerce_review_order_after_cart_contents', 'payable_now');
function payable_now() {
echo 'Payable Now';
}
Then I tried the following hook which did not return the message twice but it still added the Payable Now on top of the Product
add_action('woocommerce_review_order_after_cart_contents', 'payable_now');
function payable_now() {
if ( ! is_ajax() ) {
echo 'Payable Now';
}
}
Where I actually nee the text to appear is right after the start date displaying here
use a table element as tr td th
add_action('woocommerce_review_order_after_cart_contents', 'payable_now');
function payable_now() {
echo '<th> Payable Now </th>';
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.