Home / Admin / Add Vendor Ratings / Feedback to Product Page
Duplicate Snippet

Embed Snippet on Your Site

Add Vendor Ratings / Feedback to Product Page

Code Preview
php
<?php
add_action('woocommerce_before_add_to_cart_form','vendor_feedback_product_page');
function vendor_feedback_product_page() {
	$vendor_id   		= get_the_author_meta('ID');
	$vendor_shop 		= urldecode( get_query_var( 'vendor_shop' ) ); 
	
	if ( 'yes' != WCVendors_Pro::get_option( 'ratings_management_cap' ) ) {
		echo WCVendors_Pro_Ratings_Controller::ratings_link( $vendor_id, true );
	}
}

Comments

Add a Comment