email controls2019-12-18T23:01:58+05:30

Home Forums Core email controls

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • thesinglegourmet
    Participant
    Post count: 4

    Hello,

    Is there any way to alter the content of the email that Woowallet sends to users?

    Also, is there a way to disable the email?

    Thanks.

    Subrata Mal
    Keymaster
    Post count: 175

    You can disable wallet emails from WooCommerce > Settings > emails tab. And also override email content by copying tempalate into theme folder.

    thesinglegourmet
    Participant
    Post count: 4

    Ah, I didn’t notice a new email control setting there.

    And I found the template in /wp-content/plugins/woo-wallet/templates/emails/user-new-transaction.php and copied it to /mytheme/woo-wallet/emails/

    Thank you for the quick response.

    thesinglegourmet
    Participant
    Post count: 4

    Quick follow-up question: when I use the plugin to credit or debit the wallet, there is a “description” field. How would I include that in the custom email? I assume it would be <?php echo [please tell me what to put here] ?>

    thesinglegourmet
    Participant
    Post count: 4

    OK, I figured out how to print the description in the mail: <?php echo ($details); ?>

    Another question: I would like to have a certain message if the balance is zero; a different message if the balance is not. I have not been able to successfully identify how to compare the balance to zero. I tried this:

    if (woo_wallet()->wallet->get_wallet_balance( $user->ID ) == 0)

    but it always resolves to true, whether or not the balance is zero, even though this line

    <p><?php _e(‘Your current balance is:’) ?> <?php echo woo_wallet()->wallet->get_wallet_balance( $user->ID ); ?></p>

    displays a correct non-zero balance in the email.

    Subrata Mal
    Keymaster
    Post count: 175

    use if (woo_wallet()->wallet->get_wallet_balance( $user->ID, 'edit' ) == 0)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.