Created
July 19, 2017 22:28
-
-
Save fervous/199b00fa508c665265fd76159c2c8302 to your computer and use it in GitHub Desktop.
add vendor store sold by to product title - below - (second line) wc vendors pro
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 - title area */ | |
add_action('woocommerce_single_product_summary', 'sold_by_product_title',6); | |
function sold_by_product_title() { | |
$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