Public Ticket #3396541 How can I automatically send an email notifying subscribers whenever a WPDATAtable is updated Closed
Comments John Tan started the conversationJune 20, 2023 at 10:27amHow can I automatically send an email notifying subscribers whenever a WPDATAtable is updated? 2,576Aleksandar repliedJune 22, 2023 at 1:34pmHello John.Thank you for reaching out to us.For sending emails, you can use this: https://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/wordpress2/sending-e-mail-in-wordpress#:~:text=To%20send%20an%20e%2Dmail,authentication%20settings%20you%20defined%20above And to take values after Apply is hit, there's this hook: wpdatatables_after_frontent_edit_row( $formdata, $rowId, $tableId ) This action is executed after editing action is applied. $formdata is the array of keys and values for editing. $rowId is the ID field of the row in MySQL table that was edited. $tableId is the table identifier from the MySQL plugin table (wp_wpdatatables). For example: function sendEmailAfterEdit( $formdata, $rowId, $tableId ){ // create logic for sending emails } add_action('wpdatatables_after_frontent_edit_row', 'sendEmailAfterEdit',10,3); will be triggered in both cases when you edit or adding a new row in the table from front-end. Please note that data is already saved in database.Kind Regards, Aleksandar Vuković[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables Sign in to reply ...
How can I automatically send an email notifying subscribers whenever a WPDATAtable is updated?
Hello John.
Thank you for reaching out to us.
For sending emails, you can use this:
https://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/wordpress2/sending-e-mail-in-wordpress#:~:text=To%20send%20an%20e%2Dmail,authentication%20settings%20you%20defined%20above
And to take values after Apply is hit, there's this hook:
wpdatatables_after_frontent_edit_row( $formdata, $rowId, $tableId ) This action is executed after editing action is applied.
$formdata is the array of keys and values for editing.
$rowId is the ID field of the row in MySQL table that was edited.
$tableId is the table identifier from the MySQL plugin table (wp_wpdatatables).
For example:
function sendEmailAfterEdit( $formdata, $rowId, $tableId ){ // create logic for sending emails } add_action('wpdatatables_after_frontent_edit_row', 'sendEmailAfterEdit',10,3);
will be triggered in both cases when you edit or adding a new row in the table from front-end. Please note that data is already saved in database.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables