Steps
- Open
functions.php. - Add the code below.
- Save the file.
Done — a custom notice will be displayed at the top of the WooCommerce checkout page.
Notes
- Works only on the WooCommerce checkout page.
- Supports HTML for styling and links.
- Can be added to your theme’s
functions.phpfile or a custom plugin.
function custom_checkout_notice() {
echo '<div class="woocommerce-info">
Need help with your order? Contact us before checkout.
</div>';
}
add_action(
'woocommerce_before_checkout_form',
'custom_checkout_notice'
);