Are you using WooCommerce for your online store and looking to add some custom content after order notes in the checkout form? The “woocommerce_after_order_notes” hook is triggered after the order notes section is displayed on the checkout page. For example, you might want to display a message to customers letting them know about your return policy or shipping options.
Here 👇
Usage:
add_action( 'woocommerce_after_order_notes', 'sa_custom_content' );
function sa_custom_content( $checkout ) {
?>
<div id="sa-custom-content">
<h2>Custom Content</h2>
<p>Content Descrption</p>
</div>
<?php
}
Output:
With the same hook, you can extend the order notes section further. For example, you might want to custom input field, add a checkbox or dropdown menu that lets customers choose a delivery date or time, or add a button etc.
The $checkout
parameter can also be helpful to you. In the example above, it’s not used, but it’s WooCommerce checkout object and you can use it as per your needs.
I hope you found it useful.
Happy extending! Are you also looking to add a new custom tab on the WooCommerce account page?