Notification – email changed
-
Hi all,
We have some issue with notification – email changed. We’re using WooCommerce and users can update their email at /my-account/edit-account page.
We’ve discoverd that the subject is not populated from notification settings.
Also e-mail content doesn’t contain this strings:
/profile.php?newuseremail= ?newuseremail=So default email subject is assigned. Right now we’ve solved this problem by adding this part of code in bnfw.php file:
public function bnfw_update_email_changing_subject( $args ) { $notification_name = 'email-changed'; $notifications = $this->notifier->get_notifications( $notification_name ); if ( count( $notifications ) > 0 ) { $setting = $this->notifier->read_settings( end( $notifications )->ID ); if ( str_contains( $args['message'], '/profile.php?newuseremail=' ) ) { $subject = str_replace( '[global_site_title]', get_bloginfo( 'name' ), $setting['subject'] ); $subject = str_replace( '[[global_site_title]]', get_bloginfo( 'name' ), $subject ); $args['subject'] = $subject; } elseif ( str_contains( $args['message'], '?newuseremail=' ) ) { $subject = str_replace( '[global_site_title]', get_bloginfo( 'name' ), $setting['subject'] ); $subject = str_replace( '[[global_site_title]]', get_bloginfo( 'name' ), $subject ); $args['subject'] = $subject; } else { $subject = $setting['subject']; $args['subject'] = $setting['subject']; } } return $args; }Last elese statement.
Is it possible to include this kind of feature in future updates.
Thanks in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Notification – email changed’ is closed to new replies.