Case 1: Override HTML content displayed in order email
The Checkout Field Editor Pro for WooCommerce allows custom field value in the order email. The markup is plain p
tag & strong
tag.
But using the filter, you can alternate the HTML content that was generated by Checkout Field Editor Pro for WooCommerce.
You can change the section title or field label & value combination by some simple if statements.
An example is given below.
add_filter('thwcfe_email_display_field_html', 'override_thwcfe_email_display_field_html', 4, 10);
function override_thwcfe_email_display_field_html($html, $type, $label, $value){
if($type == 'heading'){
$html = '<h3>' . $value . '</h3>';
}
return $html;
}
Comments
0 comments
Please sign in to leave a comment.