• Resolved faisal95bd

    (@faisal95bd)


    I have got a multi-vendor store in WooCommerce with Dokan Pro.

    Now, when an order is placed I want to send the vendor’s address in the invoice email too. But I want to send the address to the invoice email for admin only.

    I tried to contact the Dokan support team: they’ve given me a snippet. But it sends the vendor’s address to the customer’s invoice email too. That’s the snippet below:

    // Display vendor address as an order meta
    remove_action( 'woocommerce_order_item_meta_start', 'dokan_attach_vendor_name', 10, 2 );
    function attach_vendor_info($item_id, $order){
      $product_id = $order->get_product_id();
      if ( ! $product_id ) {
          return;
      }
      $vendor_id  = get_post_field( 'post_author', $product_id );
      $vendor     = dokan()->vendor->get( $vendor_id );
      if ( ! is_object( $vendor ) ) {
          return;
      }
      $store_address  = dokan_get_seller_short_address( $vendor->get_id(), false );
      printf( '<br>%s: <a href="%s">%s</a> <p style="font-weight: inherit">%s</p>', esc_html__( 'Vendor', 'dokan-lite' ), esc_url( $vendor->get_shop_url() ), esc_html( $vendor->get_shop_name() ), $store_address );
    }
    add_filter('woocommerce_order_item_meta_start', 'attach_vendor_info', 10, 2);
Viewing 1 replies (of 1 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    Please note that Dokan is a third-party plugin that is not developed or supported by us, and we do not maintain compatibility between WooCommerce and Dokan either.

    We will not be able to look into these compatibility issues, however, you may want to ask Dokan support team plugin for help:

    https://www.ads-software.com/support/plugin/dokan-lite/

    Since this support forum is for questions and issues around the core WooCommerce plugin itself, and compatibility issues with third-party plugins are outside of the scope of support we are able to provide – I’ll be marking this thread as “resolved”.

    If you do require more help with the actual coding, we’d recommend you hire a developer who can take a look at this, quote you for their services, and help you add this feature to your site. We’d recommend getting in touch with a web developer or one of the customization experts listed at https://woocommerce.com/customizations/.

    Cheers.

Viewing 1 replies (of 1 total)
  • The topic ‘How can I send vendor’s address to the invoice email for admin only’ is closed to new replies.