• Resolved maxkabechani

    (@maxkabechani)


    Is there a way to include the vendor’s info like address and phone number in the Woocommerce New order Mail?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @maxkabechani ,

    This is an interesting idea.

    Dokan adds the vendor name along with the ordered items. So, you can follow that procedure to show other information as well.

    First, check how Dokan adds the vendor name to the ordered item here –

    Path: \dokan-lite\includes\wc-template.php
    Function: dokan_attach_vendor_name

    You can notice that the vendor name & URL is accessed using these –

    $vendor->get_shop_url()
    $vendor->get_shop_name()

    Following these structures, you can also get vendor’s other information like –

    get_name()
    get_phone()
    get_address()

    You can copy the mentioned function and include this new information from your theme’s functions.php file. If you are not comfortable with writing codes, please consult with an expert.

    Thank you ??

    Thread Starter maxkabechani

    (@maxkabechani)

    I found this;

    function dokan_seller_displayname( $display_name ) {
        if ( current_user_can( 'seller' ) && ! is_admin() ) {
            $seller_info  = dokan_get_store_info( dokan_get_current_user_id() );
            $display_name = ( ! empty( $seller_info['store_name'] ) ) ? $seller_info['store_name'] : $display_name;
        }
    
        return $display_name;

    Hello @maxkabechani ,

    You can use any method that suits your need. You will have many options while accessing vendors’ information in different places of Dokan files.

    Let me know if you have further queries.

    Thank you ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dokan Vendor Info in Order Email’ is closed to new replies.