-
-
Save fervous/24a588465b2b356c96f967a776089b3c to your computer and use it in GitHub Desktop.
WC Vendors Pro - Function to output vendor ratings/feedback in side bar
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
// Put this in your themes function.php | |
function vendor_feedback_sidebar() { | |
if ( is_shop() ) { | |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) ); | |
$vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop ); | |
if ( ! WCVendors_Pro::get_option( 'ratings_management_cap' ) ) echo WCVendors_Pro_Ratings_Controller::ratings_link( $vendor_id, true ); | |
} | |
} // vendor_feedback_sidebar() | |
// call this in your side bar | |
<?php sidebar_vendor_ratings(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment