I have a client who wants to put in customer orders, and tie them to a user account so the customer can login and see their order status. Is there a way for those users to be able to subscribe to the order updates and then ACF would send out an email to the customer when an order is updated?
You can create an acf/save_post filter (http://www.advancedcustomfields.com/resources/acfsave_post/)
In this filter you can get details about the user and send them an email using wp_mail() (https://codex.wordpress.org/Function_Reference/wp_mail)
Thanks, that was exactly what I was looking for.
I have a follow up question to this. Is there a way to set a pre-save variable and use it in the post-save action to allow me to compare the values and see what has changed?
I got it working using a global variable. Thanks again.
you can do this without using a global variable if you want to. If you run your filter before ACF with a priority <10 then the values in the database will hold the previous values and the $_POST[‘acf’] array will have the new values.