Specific Page Post E-mail configuration

Hello Everyone,

I am working on configuring the Specific Page/Post Confirmation e-mail and when using the %%item_name%% tag in conjunction with a coupon code, it appends the coupon code information to the front of the item name.

For instance “Discount: 99% off. (Now: $1.75) ~ ORIGINALLY: Tapping into Your”

Where “Tapping Into Your” should just be the item name, not anything else.

Any way to keep the discount code from being added to the item name?

Currently my e-mail is configured to the following:

Thanks %%first_name%% for your purchase!

%%item_name%%

Transaction ID: %%txn_id%%
Charges today: %%currency_symbol%%%%amount%%

Your order can be retrieved here:
%%sp_access_url%%

It is highly recommended that you save this e-mail. The link above gives you continued access to %%item_name%% for %%sp_access_exp%%.

If you have any trouble, please feel free to contact us at

Thanks!

Marc

Try adding something like this to your active theme’s functions.php file (or as an mu-plugin, in which case it will need to start with an opening PHP tag, like this: <?php )

function kts_text_context_changes( $translated, $original, $context, $domain ) {
    if ( $domain == 's2member' && $context == 's2member-front' ) {
        if ( $original == 'Discount: %s off. (Now: %s)' ) {
            $translated = '';
        }
        else if ( $original == '%1$s ~ ORIGINALLY: %2$s' ) {
            $translated = 'Tapping into Your'; // modify text as required (you might be able to use %2$s instead)
        }
    }
    return $translated; // return modified text
}
add_filter( 'gettext_with_context', 'kts_text_context_changes', 10, 4 );