- Would the owner really be ordering/cancelling oders that often? If not just trigger the notification on every cancellation.
- You could add a check against current user info and so long as its not the owners id – send the notification.
Maybe start with this:
Or use:
global $current_user;
Directly. It should not be too hard to check if user is logged in and NOT owner before sending notification but this depends on users logged in. Not sure of a way to check in instances when the users are not logged in other than perhaps dropping a cookie on specific IPs or checking the IP directly if the owner will only ever order from 1 location.
IMHO logged in checks would be the way to go.