Loop - tlačítko "Zobrazit detail" místo "Přidat do košíku"
<?php
/* Remove add to cart button */
function gog_remove_loop_add_to_cart_button(){
remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
}
add_action('woocommerce_before_shop_loop_item','gog_remove_loop_add_to_cart_button');
/* Add see details button to replace add to cart button*/
function gog_replace_add_to_cart_with_view_product() {
global $product;
$link = get_permalink();
echo '<div class="product-details-button"><a class="" href="' . esc_attr($link) . '">Zobrazit detail</a></div>';
}
add_action('woocommerce_after_shop_loop_item','gog_replace_add_to_cart_with_view_product');