Answer the question
In order to leave comments, you need to log in
Woocommerce: How to update the data in the custom field on the order page before sending the email so that the email has a new value?
Good afternoon! I ran into this problem:
I added a custom field to the woocommerce order page using the ACF plugin.
As planned, the manager adds a track number to this field, changes the status of the order to "fulfilled" and saves the post. At this moment, the client receives a letter in which the variable that he entered is displayed - the track number.
However, the letter is sent before the value of the custom field is written to the database, so you have to first save the track number without changing the status, and then change the status to "done" and save again.
Is it possible to achieve the following order when saving - first we save the value of the custom field to the database and then we send an email to the client? And how to do it? Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question