Home Forums Theme Support Dokan Custom Emails to Seller and Buyer

This topic is: not resolved

This topic contains 16 replies, has 3 voices, and was last updated by  Nayem 3 years, 9 months ago.

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #73179

    Donovan
    Member
    Post count: 27
    /* for email customization by donovan */
    
    function order_email_include_saler_name( $order ) {
            $saler_id = dokan_get_seller_id_by_order( $order->id );
            $saler_info = get_user_by( 'id', $saler_id );
    		$store_info = dokan_get_store_info( $saler_id );
    
            ?>
            <table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
                
                <tfoot>
                    <tr>
                        <th scope="row" style="text-align:left; width: 57%; border: 1px solid #eee; <?php  echo 'border-top-width: 4px;'; ?>"><?php _e( 'Seller Name:' ); ?></th>
                        <td style="text-align:left; border: 1px solid #eee; <?php  echo 'border-top-width: 4px;'; ?>"><?php echo $saler_info->display_name; ?></td>
                    </tr>
    				<tr>
                        <th scope="row" style="text-align:left; width: 57%; border: 1px solid #eee; <?php  echo 'border-top-width: 4px;'; ?>"><?php _e( 'Phone:' ); ?></th>
                        <td style="text-align:left; border: 1px solid #eee; <?php  echo 'border-top-width: 4px;'; ?>"><?php echo esc_html( $store_info['phone'] ); ?></td>
                    </tr>
    				<tr>
                        <th scope="row" style="text-align:left; width: 57%; border: 1px solid #eee; <?php  echo 'border-top-width: 4px;'; ?>"><?php _e( 'Seller email:' ); ?></th>
                        <td style="text-align:left; border: 1px solid #eee; <?php  echo 'border-top-width: 4px;'; ?>"><?php echo $saler_info->user_email; ?></td>
                    </tr>
                </tfoot>
            </table>
            <?php
        }
    
    add_action( 'woocommerce_email_after_order_table' , 'order_email_include_saler_name' );
    
    #73320

    Nayem
    Moderator
    Post count: 6480
    This reply has been marked as private.
Viewing 2 posts - 16 through 17 (of 17 total)

The topic ‘Custom Emails to Seller and Buyer’ is closed to new replies.