<?php // Do not allow direct access to the file.
if( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * WooCommerce Functions
 */
 
 /* View Product Button */
add_action('woocommerce_after_shop_loop_item','faster_replace_add_to_cart');

function faster_replace_add_to_cart() {
	
		global $product;
		$link = $product->get_permalink();
		echo do_shortcode('<a href="'.$link.'" class="button viewbutton">'. __( "View Product", 'faster' ) .'</a>');
	
} 

// Hide Header Image only on shop page and product pages
add_action('wp_head', 'faster_hide_all_custom_meta_boxes', 99);
function faster_hide_all_custom_meta_boxes () {
	if (is_shop() or is_product()) { ?>
	<style> .site-header{ display: none !important; }</style>
	<?php
	}
}
