Skip to main content
Login Join
Snippet · PHP

Add a Custom Message Before the Checkout Form in WooCommerce

Shared by Amit Dholiya · July 25, 2026 · @woocommerce_before_checkout_form

Back to Snippets

Steps

  1. Open functions.php.
  2. Add the code below.
  3. Save the file.

Done — a custom notice will be displayed at the top of the WooCommerce checkout page.

Notes

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'
);
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments