Changes to single-product.php

Currently, PRO is only showing elements inside the Woocommerce Description tab. I am attempting to override everything on the single product page and replace it with Cornerstone elements. So, I have copied the single-product.php into wp-content/themes/pro-child/woocommerce.

I have made the below alterations:

With some minor CSS tweaks, I am able to hide some access padding and headers.

Unfortunately, the “Add to cart” button does not quite work. It does add to the cart but it doesn’t bring me to the next page when I click on it.

Can you please help? I have added the login credentials in the Secure Note.

Hi @sgchan,

Thanks for reaching out!

I check your product page and I was able to add to the cart ( or subscribe ). I believe that you have already fixed your issue.

Thank you.

Hi @marc_a
You have misunderstood my question (or maybe I didn’t adequately or correctly describe it, sorry).

When you click ‘Add to Cart’, it would usually bring you to the Cart page. Right now, it doesn’t do any of that. How do I correct it?

Hi again,
I have resolved it with a simple code:

add_filter( 'woocommerce_add_to_cart_redirect', 'add_to_cart_redirect' );
function add_to_cart_redirect() { return wc_get_checkout_url(); }

Hi @sgchan,

We’re glad that you’re able to find a solution to your issue! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.