Skip to content

Instantly share code, notes, and snippets.

@wpflippercode
Created November 16, 2017 07:42
Show Gist options
  • Save wpflippercode/b6b2df148979a779edcafb5cbe4aefa6 to your computer and use it in GitHub Desktop.
Save wpflippercode/b6b2df148979a779edcafb5cbe4aefa6 to your computer and use it in GitHub Desktop.
Customize Ecard Email Content & Design - Woocommerce Ecards Pro
add_filter('ecp_ecard_markup','customized_ecard_markup',10,2);
function customized_ecard_markup($defaultMarkup,$content){
// Please keep the classes name on tags as it is as they are used for generating preview in JS
$defaultMarkup = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>'.$content['website_name'].' - Ecard</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Geany 1.23.1" />
</head>
<body>
<div class="ecard_container" style="background: #ffd984;color: #ffffff;text-align:center;">
<p><h2 class="email_title">'.$content['title'].'</h2></p>
<img class="fluid" src="'.$content['image'].'" style="padding-top:20px;padding-bottom:20px;">
<p class="email_message_content">'.$content['message'].'</p>
</div>
</body>
</html>';
return $defaultMarkup;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment