I'm creating a plugin to disable Cart
on WooCommerce
(even I know already some plugin doing this), I already removed the button to access cart page.
But how can I check if url is /cart
? WordPress have some function to get it?
What I need to do is like:
if (is_cart()) {
redirect('home_page');
}
I tried to use is_cart
function as said in WooCommerce doc, but seems not working for me.
is_cart()
on my theme'sfunctions.php
, even this way is not working for me.