Viewing 2 replies - 1 through 2 (of 2 total)
  • Kimber254

    (@kimber254)

    Same question here

    I added this code to mini-cart.php, located in /wp-content/plugins/woocommerce/templates/cart/mini-cart.php

    <?php echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf('<a href="%s" title="%s">× Rimuovi</a>', esc_url( $woocommerce->cart->get_remove_url( $cart_item_key ) ), __( 'Rimuovi il prodotto dal carrello', 'woocommerce' ) ), $cart_item_key ); ?><?php echo WC()->cart->get_item_data( $cart_item ); ?>

    The exact position, (in my php at line 43) is after the code (still present in the file)

    <a href="<?php echo get_permalink( $product_id ); ?>"> <?php echo str_replace( array( 'http:', 'https:' ), '', $thumbnail ) . $product_name; ?></a>

    I also noticed (in my template) that this code works correctly
    when permalinks are set this way:

    https://www.website.com/%postname%/

    but I don’t know if it’s the same for other templates.
    Hope this could be helpful!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a "Remove item"-button?’ is closed to new replies.