Title: function wpaesm_clock_out_notification modification
Last modified: December 11, 2016

---

# function wpaesm_clock_out_notification modification

 *  Resolved [gibknits](https://wordpress.org/support/users/gibknits/)
 * (@gibknits)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/function-wpaesm_clock_out_notification-modification/)
 * Love your plugin!
 * The admin for our employee scheduler site doesn’t want a separate email for employee
   notes – he wants the notes to be sent when the employee has clocked out. Therefore,
   I modified the function wpaesm_clock_out_notification to include the following:
 *     ```
       $employeenotes = get_post_meta($shift_id, '_wpaesm_employeenote', true);
       		$message .= "<p><strong>" . __( 'Notes:', 'wpaesm' ) . "</strong></p>";
       		foreach( $employeenotes as $note ) {
       			if( isset( $note['notedate'] ) && isset( $note['notetext'] ) ) {
       				$message .= "<p><strong>" . $note['notedate'] . ":</strong> " . $note['notetext'] . "</p>";
       			}
       		}
       ```
   
 * _[Moderator note: code fixed. Please wrap code in the backtick character or [use the code button](https://codex.wordpress.org/Forum_Welcome#Posting_Code).]_
 * This is great, until there is an update to the plug-in. Then my modification 
   is hosed. 🙁 Can we either disable the auto-update of the plugin, or have the
   option of notes being included with the clock-out email?
 * Thanks for your time.
    -  This topic was modified 9 years, 6 months ago by [bdbrown](https://wordpress.org/support/users/bdbrown/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Morgan Kay](https://wordpress.org/support/users/gwendydd/)
 * (@gwendydd)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/function-wpaesm_clock_out_notification-modification/#post-8544405)
 * Good question!
 * You are right that your modification will be lost when you update the plugin.
   However, not updating the plugin would be a really bad idea, because then you
   would miss out on new features and if any new updates patch security vulnerabilities,
   you would still be vulnerable.
 * Speaking of which, I am planning to release version 2.0 this week, which is a
   major code overhaul – the plugin has been completely rewritten from the ground
   up. So when 2.0 comes out, you can customize this once and for all.
 * Do you know about action hooks? If not, here’s a good intro: [http://www.nathanrice.net/blog/an-introduction-to-wordpress-action-hooks/](http://www.nathanrice.net/blog/an-introduction-to-wordpress-action-hooks/)
   Employee Scheduler has several action hooks built in which let you modify how
   it works. There is an action hook for clocking out. In 2.0, you can do this to
   use that action hook:
 *     ```
       add_action( 'shiftee_clock_out_action', 'send_note_when_clocked_out', 10, 2 );
       function send_note_when_clocked_out( $shift ) {
         /* here you would write some code that checks whether the shift has a note, and if so, email the note */
       }
       ```
   
 * Let me know if you have any questions about this!

Viewing 1 replies (of 1 total)

The topic ‘function wpaesm_clock_out_notification modification’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/employee-scheduler_d7dfb8.svg)
 * [Shiftee Basic - Employee and Staff Scheduling](https://wordpress.org/plugins/employee-scheduler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/employee-scheduler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/employee-scheduler/)
 * [Active Topics](https://wordpress.org/support/plugin/employee-scheduler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/employee-scheduler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/employee-scheduler/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Morgan Kay](https://wordpress.org/support/users/gwendydd/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/function-wpaesm_clock_out_notification-modification/#post-8544405)
 * Status: resolved