Last active
September 28, 2017 09:39
-
-
Save bentasm1/1c881f7b0e0e85dd8100 to your computer and use it in GitHub Desktop.
Remove Sold By in WC Vendors for various locations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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' ) ); | |
/* Remove from order item meta (required to remove if removing from emails too) */ | |
remove_action( 'woocommerce_add_order_item_meta', array('WCV_Vendor_Shop', 'add_vendor_to_order_item_meta'), 10, 2 ); | |
/* For WC Vendors Pro v1.0.3 and above */ | |
remove_action( 'woocommerce_after_shop_loop_item', array( $wcvendors_pro->wcvendors_pro_store_controller, 'loop_sold_by'), 8 ); | |
remove_action( 'woocommerce_product_meta_start', array( $wcvendors_pro->wcvendors_pro_store_controller, 'product_sold_by'), 8); | |
remove_filter( 'woocommerce_get_item_data', array( $wcvendors_pro->wcvendors_pro_store_controller, 'cart_sold_by' ), 8, 2 ); |
Updated! Thanks.
i tried it but it didn't remove sold by from the Order Details or the Email, does it need an update ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Missed an action.
// Remove vendor from all sales related invoices
remove_action( 'woocommerce_add_order_item_meta', array('WCV_Vendor_Shop', 'add_vendor_to_order_item_meta'), 10, 2 );