• Resolved MiKeZZa

    (@mikezza)


    When the cart is empty I want to return to homepage when you click on the orange button. But it sends to an (old) cart page. I found the code in cart-empty.php:

    do_action( 'woocommerce_cart_is_empty' );
    
    if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
    	<p class="return-to-shop">
    		<a class="button wc-backward" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
    			<?php esc_html_e( 'Return to shop', 'woocommerce' ); ?>
    		</a>
    	</p>
    <?php endif; ?>
    

    But I don’t want to add it hardcoded. So the question is; why is this page linking to the old shopping cart page and how can I let this link to the homepage?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Return to shop links to (old) cart page’ is closed to new replies.