• Hi!

    I’m using the Newsletter plugin as well as your WP User Integration add-on in a multilingual environment (with Polylang). My application creates WP users from time to time and I need to automatically create a Newsletter subscriber for each of them once created. Your add on does this very well but may be it could do it even better.
    The problem I have is the following : the language associated to each newsletter subscriber is by default the so called “current language” (as defined by polylang in my case) at the time the subscriber is created. This is not exactly what I need because the creation of the WP user is launched by a custom application and the user is not necessarily online at that time.
    When the creation of a newsletter subscriber is automatically launched by the creation of a WP user, would it make sense and would it be possible to set the subscriber language from the locale associated to the WP user, if any, instead of from the current language?

    I had a look at the code of your add-on and I believe there is a very simple way of doing what I am asking for (an adequate argument value when calling the method “get_default_subscription”). But I’d like to be sure this request is acceptable. Is it?
    Thanks in advance.
    Pierre

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Roberto Fietta

    (@webagile)

    Hello and thank you for your feedback, we have just added this to our feature request list. We will take this into consideration for future developments.

    Regards,
    Roberto
    The Newsletter Plugin

    Thread Starter erpiu

    (@erpiu)

    Hi,

    Good news! Thanks.
    For your information, below is the simple modification I did.

    In the file plugin.php of the add-on newsletter-wpusers, at line 262, I replaced the assignment :
    $subscription = $subscription_module->get_default_subscription( );
    with the following :

    $wplang = substr( get_user_meta($wp_user_id, 'locale', true), 0, 2 );  
     $subscription = empty( $wplang ) ?   $subscription_module->get_default_subscription( ) : $subscription_module->get_default_subscription( $wplang ) ;

    I hope, this will help.

    Pierre

    Plugin Author Roberto Fietta

    (@webagile)

    Thanks, I’ll forward it to our development team.
    Regards,
    Roberto

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Enhancement of the WP User Integration addon ?’ is closed to new replies.