Site logo

Archived topic

Condition Continue Shopping Link for the Woo Cart

3 replies · Started by Kris on February 25, 2021

Viewing posts 1–4 of 4

Hi,

I have added a Continue Shopping button to the cart in the woocommerce_after_cart_table hook. That works great. Now I'd like to a conditional based on what is in the cart. We want to change the link to a different page based on the Product Category of a product in the cart.

I see in the forums that we can add php conditional logic but can we get access to the products in the cart from that hook?

Thanks much!
Kris

Hi there,

GP itself cannot control this unfortunately.

This is something you will need to check with WooCommerce' support team.

All of WooCommerce conditional tags are listed here:
https://docs.woocommerce.com/document/conditional-tags/

I'm not sure if there is anything that checks the product in the cart though.

Hi Leo,
Thanks! I will get with Woo.
Kris

No problem :)

This archived topic is closed to new replies.