Add to cart and Read more on shop page in Woocommerce

				
					
/*Delete Add to cart button */
function remove_loop_button(){
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
add_action('init','remove_loop_button');
 
/* Add Read more button*/
add_action('woocommerce_after_shop_loop_item','replace_add_to_cart');
function replace_add_to_cart() {
global $product;
$link = $product->get_permalink();
echo do_shortcode('<a href="'.$link.'" class="button addtocartbutton">Подробнее</a>');
}
/* Add Add to cart button*/
add_action( 'after_setup_theme', 'lets_add_cart_button' );
function lets_add_cart_button () {
  add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 20 );
}
 
/*Delete Read more button*/
add_action( 'woocommerce_after_shop_loop_item', 'add_my_morebutton', 20);
function add_my_morebutton( ) {