• Resolved Manjunathpmf

    (@manjunathpmf)


    Hi,

    I am applying the below code to change the URL of “View Cart” button on the Shop page.

    // Change View Cart Button URL from /cart to /checkout
    add_filter( 'woocommerce_add_to_cart_redirect', 'cart_to_checkout' );
     
    function cart_to_checkout( $url ) {
        return wc_get_checkout_url();
    }

    What is the filter that I need to use to achieve the same for “View Cart” button in the “Woocommerce error message” on the Single Product Page?

    Woocommerce error message” appears something like this: “The maximum allowed quantity for ‘Product X’ is 3 (you currently have 3 in your cart). “View Cart”

    So, I need to change the URL of the “View Cart” button in the above message.

    Thanks!

    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 ‘Change URL of “View Cart” button on Product Page’ is closed to new replies.