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 | |
// Place this code in your themes functions.php | |
// Add google analytics code to vendor pages for tracking | |
function wcv_shop_name_google_analytics() { | |
if ( is_singular( 'product') ){ | |
$product = get_queried_object(); | |
if ( WCV_Vendors::is_vendor_product_page( $product->post_author ) ) { |