Skip Navigation

[Resolved] How to hide/remove the add-to-cart button on the detailed product page

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 1 voice.

Last updated by loekv 4 days, 23 hours ago.

Assisted by: Minesh.

Author
Posts
#2810783

The site is woondo.nl
I want to know how to hide/remove the add-to-cart button on the detailed product page.
I found a code snippet by Cloudways on the internet but this code does not work.
Can this action by undone. If so is there code for this?
The custom code for this is now deactivated.
Here is the code for remove.

// Put the code of your snippet below this comment.
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart');

Thanks in advance for your support.

#2810798

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I need to check first and review your current theme and settings.

Can you please share single product details page that I should use as reference and I will try to hide the add to cart button and then will share the solution with you.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2811121

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - with the code snippet you added "removebuttondetailpage" to "Custom Code" section I've adjusted the code as given under:

remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);

Can you please confirm it works as expected and add to cart button on single product is hidden now.

#2811294

Hi Minesh,

It works fine, problem solved.
Thanks a lot for your help!

Regards,
Loek