• Resolved Spleen

    (@sp1een)


    Hi all,
    I’m experiencing a minor problem to the Continue Shopping button, namely with the function associated to the “button-wc-forward” link: it simply redirects to the product page just added, instead of going back to the shop page.

    I’ve already found this topic, which is now closed and proposes two solutions:
    a) the first one is to change the theme “functions.php” file;
    b) the second one is instead to change the woocommerce-functions.php.

    I tried both and: the firs solution simply overwrites the button with a simple text link; the problem with the second solution is that the plugin have now (v. 2.3.7) many different “-functions.php” files: page-functions.php, webhook-functions.php, template-functions.php, product-functions.php, term-functions.php…

    I found that “wc-cart-functions.php” file (which is said to be inactive for me) contains pieces of code which implies the forward button with this link: <a href="%s" class="button wc-forward">%s</a> %s'
    I’m wondering if I can change the link here or somewhere else which is active in my case.

    Thanks in advance,
    Spleen

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Spleen

    (@sp1een)

    I found a solution here that seems to work, at least for me.

    I added this to the theme “functions.php” file:

    /**
    * Redirect to a specific page when clicking on Continue Shopping in the cart
    *
    * @return void
    */
    function wc_custom_redirect_continue_shopping() {
    return 'https://yourdomain.com/your-page/';
    }
    add_filter( 'woocommerce_continue_shopping_redirect', 'wc_custom_redirect_continue_shopping' );

    Fantastic! just what I was looking for thank you! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WooCommerce] Continue Shopping button redirect to the wrong page’ is closed to new replies.