Change colours in email template
-
Hi,
I currently have the Daily Email Schedule Add-On installed on my site. The main function this is used for is to send the owner a list of Key Dates due (safety certificates et) within the last 30 days.Currently, if the due date has already passed, it will change the text to Red on the email, stating Originally Due on X date.
I would like to make a small modification to this, where the text is coloured as below:
Due within 30days – Green
Due within 15days – Yellow
Due less than 15 days/Overdue – RedI think I need to add some IF statements to the below code in the “propertyhive-email-schedule.php” file, however I am not quite sure of the correct code:
$details = ''; $schedule_start_date = new DateTime($start_date); if ( $due_date < $schedule_start_date ) { // was due in the past $details = '<span style="color:#900">' . __( 'Originally due on', 'propertyhive' ) . ' ' . $due_date->format('jS M') . '</span>';
Could I get some assistance/pointers on the correct code to put in over here please to make the changes stated above?
Much appreciated!
- The topic ‘Change colours in email template’ is closed to new replies.