= $sdate) && ($tdate <= $edate)){ return true; } else { return false; } } function woo_out_of_office_include_dates_in_message($start_date, $end_date, $message){ $message_compiled = str_replace("[StartDate]", wp_date(get_option('date_format'), strtotime($start_date)), $message); $message_compiled = str_replace("[EndDate]", wp_date(get_option('date_format'), strtotime($end_date)), $message_compiled); return $message_compiled; } // function to add the out of office message to the order confirmation email add_action( 'woocommerce_email_before_order_table', 'woo_out_of_office_show_in_order_confirmation_email', 20 ); function woo_out_of_office_show_in_order_confirmation_email( $order ) { $woo_ooo_show_in_order_confirmation_email = esc_attr(get_option( 'woo_ooo_show_in_order_confirmation_email', '' )); if ((woo_out_of_office_is_active()) && ($woo_ooo_show_in_order_confirmation_email == "Yes")) { $woo_ooo_message = esc_attr(get_option( 'woo_ooo_message', '' )); $woo_ooo_title = esc_attr(get_option( 'woo_ooo_title', '' )); $woo_ooo_start_date = esc_attr(get_option( 'woo_ooo_start_date', '' )); $woo_ooo_end_date = esc_attr(get_option( 'woo_ooo_end_date', '' )); $woo_ooo_message_compiled = woo_out_of_office_include_dates_in_message($woo_ooo_start_date, $woo_ooo_end_date, $woo_ooo_message); ?>









: