Answer the question
In order to leave comments, you need to log in
How to change button links in WooCommerce?
It is necessary to change the link to the product link on the "Add to cart" buttons in the catalog, and the text to the details, but so that the "Add to cart" button in the product card does not lose its properties.
Thank you.
Answer the question
In order to leave comments, you need to log in
So you need to hide the "Add to Cart" button in the catalog using hooks.
Next, instead of it, add another button with the name "More" and display permalink as a link and that's it.
Hide cart - https://stackoverflow.com/questions/26976296/hide-...
add_action( 'woocommerce_after_shop_loop_item', 'remove_add_to_cart_buttons', 1 );
function remove_add_to_cart_buttons() {
if( is_product_category() || is_shop()) {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question