• Resolved etattoo

    (@etattoo)


    Hi, Anyone know how to find/edit that notice e-mail when product in woocoommerce is not in stock? It’s e-mail with simple line: “product out of stock” and e-mail sender is WordPress@domain… I want to remove that WordPress and maybe add some more info to e-mail but I cannot find this send function.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You need to change your admin email address in order to remove WORDPRESS from the email address. I believe there is also a setting in WooCommerce somewhere where you can say what email address the emails are set from.

    Hope this helps.

    Thread Starter etattoo

    (@etattoo)

    I have all settings correct in AP. There is no word “WordPress”. Also in WooCommerce settings I have all things good. It’s exist for notices like registration or product out of stock etc.

    Take a look here: https://ue3.pl/screen.jpg

    Im searching in files in woocommerce/templates/emails/ but cannot find that line, anyone know where it is?

    first check out on the link I have mention change the “example.com” with you websites url
    login
    https://example.com/wp-admin/admin.php?page=wc-settings&tab=email

    In this page you will see
    “Email Sender Options”

    You can change an it should work
    If it not you can try the below filter an you work will be done

    It not related to woocommerce setting
    All the email you are sending will get the same Sender name and sender Email address you can used this two filter to change that name an email respectively

    function harimay_wp_mail_from_name_callback( $email ){
    return ‘Test’; // new email name from sender.
    }
    add_filter( ‘wp_mail_from_name’, ‘harimay_wp_mail_from_name_callback’, 10001 );

    function harimay_wp_mail_from_callback ($email ){
    return ‘[email protected]’; // new email address from sender.
    }
    add_filter( ‘wp_mail_from’, ‘harimay_wp_mail_from_callback’, 10001 );

    Thread Starter etattoo

    (@etattoo)

    It’s not that – I found it ??

    It’s different settings in PHP in wp_mail function in file: wp-includes/pluggable.php on lines 373 to 391.

    There are code that input:
    $from_name = 'WordPress';
    and
    $from_email = 'wordpress@' . $sitename;

    if we don’t have a name from the input headers
    (dont know why headers are empty… seems that this mails/notifications are sending after all when headers are cleared already).

    Now its working.

    Have you directly change the file in the wp-includes/pluggable.php

    if yes then please used the above method because once you update wordpress all the Hardcore changes you have made will get loss

    Thread Starter etattoo

    (@etattoo)

    This method is correct for anyone, for me it’s not necessery. I’ve disabled auto_update function. I’m using many theme files and it’s hard to “repair” all stuff again and again when the WP is updating. Twice is enough for me ??

    But you have right. It’s better idea to replace that like this.

    It will still break when you run updates and it is discouraged to not run updates… the site will be insecure if you do not run updates.

    It is highly advised to use the method @harimay suggested add those filters to your themes functions.php file.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘E-mail from Woocommerce with notice about out of stock – where is it?’ is closed to new replies.