Created
December 19, 2017 04:59
-
-
Save fervous/546fb26dc54bc3dd207df141c284db1f to your computer and use it in GitHub Desktop.
wc vendors pro add vendor sold by to seller info tab product page
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
/* sold by product page - seller info tab */ | |
add_action('wcv_before_seller_info_tab', 'sold_by_seller_tab'); | |
function sold_by_seller_tab() { | |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) ); | |
$vendor_id = get_the_author_meta('ID'); | |
$store_url = WCVendors_Pro_Vendor_Controller::get_vendor_store_url( $vendor_id ); | |
$shop_name = get_user_meta( $vendor_id, 'pv_shop_name', true ); | |
$sold_by = '<a href="'.$store_url.'">'.$shop_name.'</a>'; | |
echo '<p>Sold By: '.$sold_by.'</p>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment