Last active
February 7, 2016 17:29
-
-
Save digitalchild/13cee4f68e12d077e5f2 to your computer and use it in GitHub Desktop.
Function to output vendor ratings in side bar
This file contains hidden or 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 | |
// 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