WordPress.org

Forums

WooCommerce - excelling eCommerce
[resolved] Redirect link Add to Cart button to Contact us Page (4 posts)

  1. thipv
    Member
    Posted 1 year ago #

    Hi !
    I'm using Woocommerce 2.1.12 and WordPress 3.9.1, With Woocommerce 2.1.12, I want to Redirect link Add to Cart button to Contact us Page or About us Page.
    Help me !
    Thanks all !

    https://wordpress.org/plugins/woocommerce/

  2. Claudio Sanches
    Member
    Plugin Author

    Posted 1 year ago #

    Here how to fix this http://docs.woothemes.com/document/set-a-custom-add-to-cart-url-to-redirect-to/

    function custom_add_to_cart_redirect() {
        return get_permalink( 123 ); // Replace the 123 with your page ID!
    }
    
    add_filter( 'add_to_cart_redirect', 'custom_add_to_cart_redirect' );
    
  3. terrytsang
    Member
    Posted 1 year ago #


  4. terrytsang
    Member
    Posted 1 year ago #

    Hi @thipv, you can use this free plugin woocommerce direct checkout

  5. thipv
    Member
    Posted 1 year ago #

    Thanks Claudio Sanches,You insert code:

    function custom_add_to_cart_redirect() {
    return get_permalink( 123 ); // Replace the 123 with your page ID!
    }
    add_filter( 'add_to_cart_redirect', 'custom_add_to_cart_redirect' );

    to file function.php of theme?

    Hi terrytsang!
    Plugin of you, I used but It's error.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic