Skip to content

Commit

Permalink
Update change notification email fields to include all tsml_export_co…
Browse files Browse the repository at this point in the history
…lumns.
  • Loading branch information
gobborg committed Jun 23, 2024
1 parent 136a2e7 commit 7b4f46a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions includes/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

//handle all the metadata, location
add_action('save_post', function ($post_id, $post, $update) {
global $tsml_nonce, $wpdb, $tsml_notification_addresses, $tsml_days, $tsml_contact_fields;
global $tsml_nonce, $wpdb, $tsml_notification_addresses, $tsml_days, $tsml_contact_fields, $tsml_export_columns;

//security
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
Expand Down Expand Up @@ -451,11 +451,8 @@
} else {
$message .= sprintf(__('This is to notify you that %s created a <a href="%s">new meeting</a> on the %s site.', '12-step-meeting-list'), $user->display_name, get_permalink($post->ID), get_bloginfo('name'));
}
$message .= '</p><table style="font:14px arial;width:100%;border-collapse:collapse;padding:0;">';
$fields = array_merge(
['name', 'day', 'time', 'end_time', 'types', 'notes', 'location', 'formatted_address', 'region', 'location_notes', 'group', 'district', 'group_notes'],
array_keys($tsml_contact_fields)
);
$message .= '</p><table style="font:14px arial;width:100%;border-collapse:collapse;parray_keys($tsml_export_columns)adding:0;">';
$fields = array_keys($tsml_export_columns);
foreach ($fields as $field) {
$new = $old = '';

Expand Down

0 comments on commit 7b4f46a

Please sign in to comment.