Skip to content

Instantly share code, notes, and snippets.

@blogjunkie
Created May 12, 2021 02:25
Show Gist options
  • Save blogjunkie/381aeaf2aa18933ddd6afe4bec5b8423 to your computer and use it in GitHub Desktop.
Save blogjunkie/381aeaf2aa18933ddd6afe4bec5b8423 to your computer and use it in GitHub Desktop.
Add a note to WooCommerce checkout
<?php // don't copy this line
/**
* Add a note to WooCommerce checkout
*
* This snippet adds a message to the checkout screen. You can have the message appear at different location
* by changing the `woocommerce_review_order_before_payment` hook to any other hook. Refer to:
* https://www.businessbloomer.com/woocommerce-visual-hook-guide-checkout-page/
*/
add_action( 'woocommerce_review_order_before_payment', 'my_checkout_message', 15 );
function my_checkout_message() {
?>
<div class="" style="background:#FFFCEA; border-radius:5px; border:1px solid #F6DFA4; color:#F6DFA4; padding:20px 25px;">
<p><strong>Please ensure that JavaScript is enabled in your browser</strong></p>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment