How to disable Woocommerce Wordpress REST API

65 Views Asked by At

I am trying to build an application where I interact with external API. Woocommerce is blocking all the basic authenticating I'm making. The problem is I need woocommerce in the wordpress section. How do I fix this issue?

If I deactivate woocommerce, everything works well, once I activate it back, it stops

1

There are 1 best solutions below

5
the_gujarati On

You can try this code block. Open your current active theme's function.php file and go to the end of it. Add below mentioned code.

// Disable WooCommerce REST API add_filter('woocommerce_rest_enabled', '__return_false');