How to add Custom Shortcode to the Gift Card email template?

You can use the ‘wps_wgm_email_template_html’ filter for adding custom shortcodes in the Gift Card template. Add the following code in functions.php file in your theme.

 

add_filter('wps_wgm_email_template_html','wps_wgm_custom_shortcode',10,2)

//Add information according to the $args data.

function wps_wgm_custom_shortcode( $templatehtml, $args ){

$templatehtml = str_replace( '[CUSTOM_SHORTCODE]', $custom_data, $templatehtml );

return $templatehtml;

}

Was this Helpful ?

CONTACT

Ready to transform how you market your business

Let's get connected for a free consultation