Skip to content

Instantly share code, notes, and snippets.

@matt-h
Created April 15, 2016 15:40
Show Gist options
  • Save matt-h/8a8029425252f30cf0a517eff923d673 to your computer and use it in GitHub Desktop.
Save matt-h/8a8029425252f30cf0a517eff923d673 to your computer and use it in GitHub Desktop.
woocommerce email replacement string
<?php
function woocommerce_email_format_string_find( $find, $email ) {
$find['customer_info'] = '{customer_info}';
return $find;
}
add_filter( 'woocommerce_email_format_string_find', 'woocommerce_email_format_string_find', 10, 2 );
function woocommerce_email_format_string_replace( $replace, $email ) {
$replace['customer_info'] = 'replacement string';
return $replace;
}
add_filter( 'woocommerce_email_format_string_replace', 'woocommerce_email_format_string_find', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment