Skip to content

Instantly share code, notes, and snippets.

@roscabgdn
Created July 26, 2018 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roscabgdn/7d06a4b0f8deb5c94b7c04a11d715ed3 to your computer and use it in GitHub Desktop.
Save roscabgdn/7d06a4b0f8deb5c94b7c04a11d715ed3 to your computer and use it in GitHub Desktop.
Remove "Billing" text from wc notice errors
function rbpixel_customize_wc_errors( $error ) {
if ( strpos( $error, 'Billing ' ) !== false ) {
$error = str_replace("Billing ", "", $error);
}
return $error;
}
add_filter( 'woocommerce_add_error', 'rbpixel_customize_wc_errors' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment