• Resolved ncneska

    (@ncneska)


    Hi! I am so appreciative of this plugin! I hope you can help with a question/request.

    I’d like to add a respond-by date to the email template(s). Specifically, I’d like for them to respond within 2 days of the current date. For instance, “Please respond to this email by July 12, 2018” (2 days later than current date).

    Using the shortcode from check_out as an idea, I tried adding current_date_plus2days to the email template but obviously it didn’t work ??

    Is there a way to add this shortcode? Thanks for your help!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    You can make this customization for having this shortcode in the “New visitor email”.

    Please open this file ../{Booking Calendar Folder}/core/admin/page-email-new-visitor.php

    ( you can check how to edit files in WordPress menu in this article https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/ )

    then find this code:


    $replace[ 'check_out_plus1day'] = $my_check_out_plus1day; //FixIn: 6.0.1.11

    and replace it to this code:


    $replace[ 'check_out_plus1day'] = $my_check_out_plus1day; //FixIn: 6.0.1.11
    $replace[ 'current_date_plus2days'] = wpbc_change_dates_format( date_i18n( 'Y-m-d H:i:s', strtotime( " +2 days" ) ) );

    Disclaimer. Unfortunately we can not start, right now, some personal customization or custom development, because almost have no free time.
    Check more about new features here https://wpbookingcalendar.com/faq/need-new-feature/
    Thank you for understanding.
    Please note, if you will modify the source code of the Booking Calendar, we will not guaranteed the correct work of plugin and do not support it.

    Thread Starter ncneska

    (@ncneska)

    Thanks for the quick reply!

    A couple of small clarifications:

    1) The original and replacement code have the same first line of:

    $replace[ ‘check_out_plus1day’] = $my_check_out_plus1day; //FixIn: 6.0.1.11

    I left that line alone and just added this code you supplied:

    $replace[ ‘current_date_plus2days’] = wpbc_change_dates_format( date_i18n( ‘Y-m-d H:i:s’, strtotime( ” +2 days” ) ) );

    It didn’t work, so I just want to make sure I did it correctly.

    2) The shortcode would be [current_date_plus2days] correct?

    Thanks again!

    Plugin Author wpdevelop

    (@wpdevelop)

    Yes that’s correct.
    This file relative to the “New booking” email that is sending to the visitor.
    Kind Regards.

    Thread Starter ncneska

    (@ncneska)

    Got it. Unfortunately, this didn’t work. It looks correct but inserting the shortcode into the email template just produces a blank space. If you’re able to double check this, that would be wonderful!

    I’m including a few lines before and after just to show you where I’m inserting this new line of code (these are now lines 971-975 in booking/core/admin/page-email-new-visitor.php:

    $replace[ 'check_out_date' ]    = $my_check_out_date;
    	$replace[ 'check_out_plus1day'] = $my_check_out_plus1day; //FixIn: 6.0.1.11
    	$replace[ 'current_date_plus2days'] = wpbc_change_dates_format( date_i18n( 'Y-m-d H:i:s', strtotime( " +2 days" ) ) );
        $replace[ 'check_out_minus1day'] = $my_check_out_minus1day;                   //FixIn: 7.2.1.6
        $replace[ 'dates_count' ]   = count( $my_dates4emeil_check_in_out );

    Did I miss anything?

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.

    Just checked and tested, and its working at my local system.
    Please note, “New (visitor)” email its second tab at the Booking > Settings > Emails page.
    And there you need to use this shortcode: [current_date_plus2days]
    Please insert this shortcode, when you editing the content of the email in “Text” view mode of content editor and not the visual view mode.
    Kind Regards.

    Thread Starter ncneska

    (@ncneska)

    Oh, I see now! It doesn’t show on the test email, but displays correctly when I do a test booking. Thank you so very much!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add a deadline response date to email template’ is closed to new replies.