Last active
October 20, 2015 07:52
-
-
Save digitalchild/badabf867eaff01a9fb0 to your computer and use it in GitHub Desktop.
Override the sold by in 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
<?php | |
// The following section of code will override the sold by in the loop and product pages | |
// Change the url to the buddypress call for the user id (i dont know what that is) | |
add_filter( 'wcv_loop_sold_by', 'vendor_shop_url_update'); | |
add_filter( 'wcv_product_sold_by', 'vendor_shop_url_update'); | |
function vendor_shop_url_update( $args ) { | |
// Grab the id out of the array so that you can get information about their username. | |
$vendor_id = $args['vendor_id']; | |
if ( WCV_Vendors::is_vendor( $vendor_id ) ) { | |
$args['shop_url'] = 'http://yourlinktobuddypressprofilehere.com'; | |
} | |
return $args; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment