Hi @1jd123,
I hope you are doing well today!
Our SLS team provided the following code snippet for you to try as a mu-plugin
<?php
add_action('admin_init', 'wpmudev_resend_activation_link');
function wpmudev_resend_activation_link() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
if ( isset( $_GET['page'] ) ) {
if ( $_GET['page'] == 'forminator-entries' && isset( $_GET['form_id'] ) ) {
if ( ! isset( $_GET['formi_resend_notification'] ) ) {
return;
}
global $wpdb;
$form_id = $_GET['form_id'];
$table_name = Forminator_Database_Tables::get_table_name( Forminator_Database_Tables::FORM_ENTRY_META );
$entry_table_name = Forminator_Database_Tables::get_table_name( Forminator_Database_Tables::FORM_ENTRY );
$sql = "SELECT m.
meta_value
FROM {$table_name} m LEFT JOIN {$entry_table_name} e ON(e.entry_id
= m.entry_id
) WHERE e.form_id
= %d AND m.meta_key
= %s AND ( e.draft_id IS NULL OR e.draft_id = '' ) AND e.is_spam
= 0 order by m.meta_id
";
$entry_ids = $wpdb->get_results( $wpdb->prepare( $sql, $form_id, 'activation_key' ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
if ( ! empty( $entry_ids ) ) {
foreach ( $entry_ids as $entry ) {
$activation_key = $entry->meta_value;
if ( ! empty( $activation_key ) ) {
$url = add_query_arg(
array(
'page' => 'account_activation',
'key' => $activation_key,
),
home_url( '/' )
);
$signup = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->base_prefix}signups WHERE activation_key = %s", $activation_key ) );
if ( ! $signup->active ) {
$username = $signup->user_login;
$recipient = $signup->user_email;
$urlparts = parse_url( home_url() );
$domain = $urlparts['host'];
$headers = array(
'Content-Type: text/html; charset=UTF-8',
'From: ' . html_entity_decode( get_bloginfo( 'name' ), ENT_QUOTES ) . ' <admin@' . $domain . '>',
);
$subject = sprintf( esc_html__( 'Activation link for %s', 'forminator' ), $username );
$message = '<p>' . esc_html__( 'To activate your user account, please click the following link:', 'forminator' ) . '</p>';
$message .= '<p>' . esc_url_raw( $url ) . '</p>';
$message .= '<p>' . esc_html__( 'After you activate, you will receive *another email* with your login.', 'forminator' ) . '</p>';
if ( ! empty( $recipient ) && ! empty( $subject ) && ! empty( $message ) ) {
$sent = wp_mail( $recipient, $subject, $message, $headers );
}
}
}
}
}
}
}
}
You can find more information below on how to use mu-plugins below;
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
https://www.ads-software.com/support/article/must-use-plugins/
After adding the snippet, you will need to visit the entries/submission page?yourdomain.com/wp-admin/admin.php?page=forminator-entries&form_type=forminator_forms&form_id=3461&paged=1?with an extra parameter?formi_resend_notification
.
So, the final URL should be?yourdomain.com/wp-admin/admin.php?page=forminator-entries&form_type=forminator_forms&form_id=3461&paged=1&formi_resend_notification
Your form ID will be different, therefore please check and replace 3461 above accordingly. Once page is reloaded you should remove the?formi_resend_notification
?parameter from the URL or else it will re-send all the notifications.
Kind regards,
Zafer