Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Make the Order Notes field required in the WooCommerce Checkout
// Place this code in your theme's functions.php file
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields['order']['order_comments']['required'] = true;
return $fields;
}
@ikazi1

This comment has been minimized.

Copy link

@ikazi1 ikazi1 commented Feb 11, 2019

Any chance to change place holder text?

@auludag

This comment has been minimized.

Copy link

@auludag auludag commented May 13, 2019

Any chance to change place holder text?

this would help. https://gist.github.com/13122310958/48690a4adec05e50acd8b51011e23de5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment