Okay
  Public Ticket #1886787
Eonet Manual User Approve
Closed

Comments

  • Max started the conversation

    I'm after a solution to specify in Eonet MUA settings an email address where to send registration requests which is different from the WordPress administrator address.

    A filter function like this:

    $admin_email = 'new@email.address';
    $from_name = get_option( 'blogname' );
    $headers = array(
        "From: \"{$from_name}\" <{$admin_email}>\n",
        "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n",
    );
    apply_filters( 'eonet_mua_email_headers', $headers );

    does not seem to work.

    I'd also like to include other information in the registration request mail sent to such address, like the "billing_company" value from the wp_usermeta table used by Woocommerce.

    Thanks in advance for any help you'll be able to supply.

    (p.s. also please guys let us know you care about us WP people posting in the public support forums of your plugin over at wordpress.org, it's rare to receive comments from you, we keep replying to each other hoping things will work ;)


  •  574
    François replied

    Hello Max, 

    Sorry about that! It's kinda going after our WordPress themes, which are on fire, most of the dayssmile.png Will push an update next week adding missing actions/filters so you can get that working.

    If you go to this class: component-manual-user-approve/classes/Eonet_MUA_Message.php 

    You will see one filter / message so you should be able to override any message and add your own automatic content at the end in a quite straightforward way. Like:

    eonet_mua_message_alert_authentication_pending

    Will also reply the posts on the WordPress.org forum. Thanks for the message here! Much appreciated.  

    Kind Regards,

    François 

    Want feedback on your awesome site? Get yourself a beta access on our new product Feedier.com here: https://feedier.com/

  • Max replied

    Thanks François! Looking forward to the next update then.

    Just to make sure I'm following your tip, the eonet_mua_message_alert_authentication_pending refers to the message user will receive, right? Comment on that function says "Retun the message content that alert user about the pending status of him account during the login process".

    Maybe to add WooCommerce's billing_company value to the mail admin will receive I should filter eonet_mua_email_body_approval_request_to_admin instead? Comment on that says "Content of the email that alert the admin about a new user approval request".

    Also on that file, there seems to be something with a typo: could eonet_mua_email_content_pending_uers_url be eonet_mua_email_content_pending_users_url instead? Although I could not find any reference to both in any other file.

  •  574
    François replied

    Hello, 

    Typo fixedsmile.png 

    Yes, you can use any of those filters to apply your own content. 

    Not sure, didn't develop it, please test them and if it doesn't work, let me know and I'll change it. I'll try to push an update this week. 

    But this should work fine though: 

    add_filter('eonet_mua_message_alert_authentication_pending', function($body) {
        $body .= 'Your custom content';
        return $body;
    });

    Kind Regards,

    François 

    Want feedback on your awesome site? Get yourself a beta access on our new product Feedier.com here: https://feedier.com/