Home Forums Theme Support Dokan Customer Emails to shop NOT admin

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Nayem 4 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42049

    Tracy
    Member
    Post count: 134

    Hello,

    Is there a way to make the CUSTOMER EMAILS (for and after a sale) go to the SELLER and not me (the admin of the site)?

    #42074

    Tracy
    Member
    Post count: 134

    and SELLERS are NOT getting an email with the variation selection for orders either… So they have no idea what to ship to the sellers…

    I see others have had this issue… but it still has not been resolved???

    #42124

    Nayem
    Moderator
    Post count: 6480

    Hello Tracy,

    If you want to send the mail only to the seller then please open Dokan/includes/theme-function.php. In this file you will get this function-

    function dokan_wc_email_recipient_add_seller( $admin_email, $order ) {
        $emails = array( $admin_email );
    
        $seller_id = dokan_get_seller_id_by_order( $order->id );
    
        if ( $seller_id ) {
            $seller_email = get_user_by( 'id', $seller_id )->user_email;
    
            if ( $admin_email != $seller_email ) {
                array_push( $emails, $seller_email );
            }
        }
    
        return $emails;
    }

    You have to replace this with the below code-

    function dokan_wc_email_recipient_add_seller( $admin_email, $order ) {
        $emails = array( $admin_email );
    
        $seller_id = dokan_get_seller_id_by_order( $order->id );
    
        if ( $seller_id ) {
            $seller_email = get_user_by( 'id', $seller_id )->user_email;
    
            if ( $admin_email != $seller_email ) {
                // array_push( $emails, $seller_email );
                $emails = array( $seller_email );
            }
        }
    
        return $emails;
    }

    In the second post you have mentioned about the variation data in the invoice. You are right. We will fix it in our next update.

    Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Customer Emails to shop NOT admin’ is closed to new replies.