Add alert message on checkout page
-
Hi,
How to make a Notification/Alert message display on the top of checkout page ?
Thanks
Hello,
Could you please clarify the type of alert message you would like to display on the checkout page?
Once I understand the specific message and its purpose, I can guide you on how to implement it effectively. Let me know!
Best Regards
Hi Aizaz,
The same type of messages as in the attached image.
A message to be shown automatically on checkout page, with any info I need to display.
Thanks
Attachments:
You must be
logged in to view attached files.
Hello,
WooCommerce already displays validation error messages when a required field like “Billing Last Name” is not filled, and the customer clicks the “Place Order” button. These messages are dynamic and handled automatically by WooCommerce.
If you still want to display a static notification at the top of the checkout page as a reminder (before the user submits the form), you can add this code in function.php of the child theme.
add_action('woocommerce_before_checkout_form', 'custom_static_notice_on_checkout');
function custom_static_notice_on_checkout() {
echo '<div class="woocommerce-info">Please ensure all required fields, such as "Billing Last Name," are completed before placing your order.</div>';
}
Best Regards
Thank you very much Aizaz. That’s what I needed.
Have a great day !
Most Welcome!!!.
I’m so happy to hear you are pleased with the Theme and Support. XTEMOS strives to deliver the best customer experience, and it makes our day to hear we have accomplished that.
We count ourselves lucky to have you as a customer. You can always reach us at any time. We are always here to help you.
Thanks for contacting us.
Have a great day.
Topic Closed.
Best Regards.
The topic ‘Add alert message on checkout page’ is closed to new replies.