Archived topic
I want to change the link of a Woocommerce button
10 replies · Started by Nick on April 24, 2018
Hi - I was wondering if you could do me a favor and look at my shop page for a minute. The "add to cart" button under the Trump movie obviously adds the item to the cart, but I want to change it. If a person clicks that "add to cart" button I want to send them to the product description page, the same way that clicking on the picture does. Can we do that?
Hi there,
I believe you would have to use a WooCommerce filter like this one:
https://generatepress.com/forums/topic/woocommerce-cart-in-primary-menu-how-to-change-url-from-cart-to-checkout/#post-559278
You'd have to check with their support to see how you can link it to the product description :)
Let me know if this helps.
Leo, that looks pretty similar to what I'm trying to do, only I'm trying to set the link to the description page instead of the checkout page. I spoke with Woo and they said they don't give out code for their plugin, so I was hoping you could help me. Can you at least tell me if I would need CSS or PHP to achieve this goal? Thanks, Leo!
Sorry WooCommerce said they don't give out code for their own plugin?
That sounds a bit strange haha
It will definitely be PHP. I would recommend asking on this site: https://stackoverflow.com/
Leo, Woocommerce doesn't have very good service. Anyway, I noticed Tom gave that other guy some PHP code for his problem. Is there any way that you or Tom could do the same for me? I have Code Snippets installed, so I could just throw the code in there and be done. No problem if you can't done it, I just thought I'd ask. Thanks for everything...
Perhaps something like this might help?: https://businessbloomer.com/woocommerce-remove-add-cart-add-view-product-loop/
Thanks for the link, Tom. I appreciate it.
Actually, Tom, the code on that website doesn't work. It gives me an error code when I ut it in Code Snippets. Perhaps it's outdated, or something. Anyway, I'm still stuck...
Actually, perhaps this will work better: https://stackoverflow.com/a/36309400
Thanks, Tom. I really appreciate it...
You're welcome :)