• Resolved doudou8

    (@doudou8)


    Hello, I want to change the link of the return to shop button (the one in the cart when the cart is empty). I searched in the editor (HTML) but I haven’t found it. Can you tell me where is that line in the code?

    Thank you!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @doudou8,

    Please add this code to the end of functions.php file in the theme.

    function store_mall_wc_empty_cart_redirect_url() {
            $url = 'https://example.com/sample-page'; // change this link to your need
            return esc_url( $url );
        }
        add_filter( 'woocommerce_return_to_shop_redirect', 'store_mall_wc_empty_cart_redirect_url' );

    Regards,
    Theme Palace

    Thread Starter doudou8

    (@doudou8)

    He re is the end of my code :

    add_filter( ‘get_header_image_tag’, ‘store_mall_header_image_tag’, 10, 3 );

    if ( ! function_exists( ‘store_mall_exclude_sticky_posts’ ) ) {
    function store_mall_exclude_sticky_posts( $query ) {
    if ( ! is_admin() && $query->is_main_query() && $query->is_home() ) {
    $sticky_posts = get_option( ‘sticky_posts’ );
    if ( ! empty( $sticky_posts ) ) {
    $query->set(‘post__not_in’, $sticky_posts );
    }
    $query->set(‘ignore_sticky_posts’, true );
    }
    }
    }
    add_action( ‘pre_get_posts’, ‘store_mall_exclude_sticky_posts’ );

    Where do I put it?

    Hello @doudou8 ,

    Put it at the very end of the functions.php right after add_action( ‘pre_get_posts’, ‘store_mall_exclude_sticky_posts’ );

    Regards,
    Theme Palace

    Thread Starter doudou8

    (@doudou8)

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do I change the link of the return to shop button?’ is closed to new replies.