• Resolved chris7900

    (@chris7900)


    Hi,

    Thanks for the amazing plugin.

    I added the following code given in your support. But the “Sold by vendor name” comes up in the order emails to the admin and customer.

    Below is the code we used.

    ____________________________

    /* Remove sold by in product loops */
    remove_action( ‘woocommerce_after_shop_loop_item’, array(‘WCV_Vendor_Shop’, ‘template_loop_sold_by’), 9, 2);

    /* Remove sold by in cart view */
    remove_filter( ‘woocommerce_get_item_data’, array( ‘WCV_Vendor_Cart’, ‘sold_by’ ), 10, 2 );

    /* Remove sold by on single product pages */
    remove_action( ‘woocommerce_product_meta_start’, array( ‘WCV_Vendor_Cart’, ‘sold_by_meta’ ), 10, 2 );

    /* Remove sold by in emails */
    remove_filter( ‘woocommerce_order_product_title’, array( ‘WCV_Emails’, ‘show_vendor_in_email’ ), 10, 2 );

    /* Remove the entire seller info tab */
    remove_filter( ‘woocommerce_product_tabs’, array( ‘WCV_Vendor_Shop’, ‘seller_info_tab’ ) );

    ____________________________________________

    https://www.ads-software.com/plugins/wc-vendors/

Viewing 11 replies - 1 through 11 (of 11 total)
  • https://github.com/wcvendors/wcvendors/blob/master/classes/admin/emails/class-emails.php#L24

    ^^ That’s the PHP that adds the filter which includes the Sold By: Vendorname in the emails. The function is called “show_vendor_in_email” which is here:

    https://github.com/wcvendors/wcvendors/blob/master/classes/admin/emails/class-emails.php#L83

    So, the code to remove that filter would be:

    remove_filter( ‘woocommerce_order_product_title’, array( ‘WCV_Emails’, ‘show_vendor_in_email’ ), 10, 2 );

    …if it is not working for you, check to make sure the quotes are single quotes, sometimes those can copy and paste funny.

    …if it still does not work, something is causing a conflict, so you can edit the plugin directly and simply comment out line #24 by adding two slashes in front of the add filter so it would read:

    //add_filter( ‘woocommerce_order_product_title’, array( ‘WCV_Emails’, ‘show_vendor_in_email’ ), 10, 2 );

    Thread Starter chris7900

    (@chris7900)

    Thanks for the help and reply.

    Tried all methods, still it keeps showing up. I even delete that line from the plugin, but still it shows up.

    Any help?

    Thanks!

    Thread Starter chris7900

    (@chris7900)

    Any help with this one? ??

    also when are you guys planning to release pro version?. Really like this plugin and looking for more features ??

    We’ll get there. The advice I gave *should* work. But now since you say it did not, I have to go back and test things out and report back to you. After all it’s Saturday, and my wife is nearly ready to deliver our son, so we’re not exactly programming and testing things out 24 hours a day around the clock. ?? ?? ?? I’ll have time later tonight to fiddle with it and see what the potential problem may be and will update this thread then. Dont worry, we always got your back.

    Pro will be released on October 1st! It’s coming soon……

    Still working on this, I confirmed it doesnt work as intended with the code. Standby for a fix……….

    Appears to be a bug. We’ll take a better look at it for resolution. When it’s resolved, you’ll see it here:

    https://github.com/wcvendors/wcvendors/issues/188

    Ben

    Thread Starter chris7900

    (@chris7900)

    awesome and congrats on the new addition to the family.

    Will wait for the fix ??

    Hello,

    There was an action missed in the docs.

    remove_action( 'woocommerce_add_order_item_meta', array('WCV_Vendor_Shop', 'add_vendor_to_order_item_meta'), 10, 2 );

    cheers,

    Jamie.

    Thread Starter chris7900

    (@chris7900)

    Perfect that code worked. SOLVED!

    none of the above work for me has anybody found another way to remove this from the email without hacking the plugin

    @ravetickets – If that code doesn’t work for you, double check to make sure you’re copy and pasting the right single quotes and such. Most likely it’s a formatting issue. Here’s a link to guaranteed-good-formatting on GitHub:

    https://gist.github.com/bentasm1/1c881f7b0e0e85dd8100

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Sold by still showing via order email’ is closed to new replies.