• Resolved contactovisualpt

    (@contactovisualpt)


    Hi

    Can I use ‘{FIRSTNAME}’, ‘{LASTNAME}’ in the body of the message?
    Tried, but does not seems to add the user name.

    Nelson

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dorishk

    (@dorihsk)

    Hello,

    Thanks for using our plugin. Can you please confirm which version of WooCommerce and WordPress are you using?

    Kind Regards,

    Thread Starter contactovisualpt

    (@contactovisualpt)

    The latest:
    Wordpress 5.6
    Woocommerce 4.8.0

    Anyway, I traced your plugin to search for what could be wrong, and found that in the file class-bdv.php, the variables

    $first_name = !empty($birthday_user->data->first_name) ? $birthday_user->data->first_name : '' ;
    $last_name = !empty($birthday_user->data->last_name) ? $birthday_user->data->last_name : '';

    are not retrieving the required values. So I added a direct call to obtain these values with this:

    $user = get_user_by( 'email', $user_email );
       if (!empty($user)) {
        $first_name = $user->first_name;
        $last_name = $user->last_name;
       }
    

    and now I have the right values inside ‘{FIRSTNAME}’, ‘{LASTNAME}’ in the message.
    This works for now.
    Hope you can fix the the plugin in a future update.

    Happy New Year

    Plugin Author dorishk

    (@dorihsk)

    Hello,

    Glad to know that you have got the issue fixed. Yes we are going to fix that in our next version release of the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Code on email message’ is closed to new replies.