Archived topic
delete button in woocommerce
4 replies · Started by jal-mj on May 28, 2021
hi,
I would like to delete this botton in the woocommerce process. Is in the checkout page because I have skipped the cart page.
https://www.screencast.com/t/K5iCvxpQKREP
Do you know how to do it?
Thank you very much.
dont worry, thank you! i found it in internet.
add_filter( 'wc_add_to_cart_message_html', 'ql_remove_add_to_cart_message' );
function ql_remove_add_to_cart_message( $message ){
return '';
}
Glad to hear that!
Hey David,
Which option is better to do that. Make a snipped that run everywhere or make a hook that only apply in the woocommerce area? Or even only in the exact page that I want to delete the button.
In that case, what is the way to do it correctly? I'm not a pro in hooks so I make a snippet that apply everywhere, but I suspect is not the more effective way.
Thank you.
Hi Juan,
We recommend using code snippet plugin to add filters.
Other methods to deal with PHP:
Adding PHP: https://docs.generatepress.com/article/adding-php/