Reply 281663 to: Change the redirect of the WooCommerce Ā«back to storeĀ» button

Avatar: Rose Tyler
Rose Tyler
Support staff
March 29, 2021 at 16:13

Read this article – https://developer.wordpress.org/themes/advanced-topics/child-themes/#using-functions-php
Just add the next code in functions.php of your child theme:

if ( ! function_exists( 'etheme_get_mini_cart_empty' ) ) {
	function etheme_get_mini_cart_empty(){
		?>
        <div class="woocommerce-mini-cart__empty-message empty">
            <p><?php esc_html_e( 'No products in the cart.', 'xstore' ); ?></p>
			<?php if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
                <a class="btn" href="https://www.cuentosenlacabeza.com/nuestra-libreria/"><span><?php esc_html_e('Return To Shop', 'xstore') ?></span></a>
			<?php endif; ?>
        </div>
		<?php
	}
}

Regards

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.