Plugin Support
Missy a11n
(@m155y5)
Automattic Happiness Engineer
Hi @trixox – this code should do that on the shop or category pages for you:
/* Remove add to cart button */
add_action('woocommerce_before_shop_loop_item','remove_loop_add_to_cart_button');
function remove_loop_add_to_cart_button(){
global $product; // Current product
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
/* Add see details button to replace add to cart button*/
add_action('woocommerce_after_shop_loop_item','replace_add_to_cart_with_view_product');
function replace_add_to_cart_with_view_product() {
global $product;
$link = get_permalink();
echo '<a class="button" href="' . esc_attr($link) . '">See Details</a>';
}
As far as replacing the button for the pages generated using WooCommerce Blocks, I’m afraid that is not currently customizable (more on that here).
Plugin Support
Missy a11n
(@m155y5)
Automattic Happiness Engineer
We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please feel free to start a new thread.