Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

Remove links from Vendor New Order email

WCMp Core

Resolved
Viewing 3 reply threads
  • Author
    Posts
    • #129426
      redilson
      Participant

      Hello,

      Is there a way to remove the product links in the email that goes to vendors for an order? It’s being fed by “$vendor->vendor_order_item_table($order, $vendor->term_id);” in the template, so I’m not able to edit the template to remove it. Thank you for the help.

    • #129453

      Hello thank you getting in touch with us ,
      As you want to remove some fields from vendor new order mail. So for this, you have to override the vendor-new-order.php template and modify the codes.
      In order to override vendor-new-order.php, copy it to yourtheme/dc-product-vendor/emails/vendor-new-order.php

      This link is the code of our template : https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/master/templates/emails/vendor-new-order.php

    • #129471
      redilson
      Participant

      Thanks for the response, however, overriding the template won’t do it as the html for the product links aren’t in the template. It’s generated by the function I shared in the first post, which isn’t something we have control of in the template to change.

    • #129573

      Hi,
      Kindly use below filter

      apply_filters('woocommerce_order_item_name', sprintf('<a href="%s">%s</a>', get_permalink($item->get_product_id()), $item->get_name()), $item);
      Copy

      but is will remove link from everywhere with product link.

      Other wise you have to override the email template and copy the function and paste it in the template and then make some little modification
      to compatible the code add add your changes.

      If you need any help then let me know.
      Regards

Viewing 3 reply threads

The topic ‘Remove links from Vendor New Order email’ is closed to new replies.