7

I'm using the WooCommerce API and getting some errors with no information on what's causing the error.

How would I view the logs to see what's happening?

Jordash
  • 2,926
  • 8
  • 38
  • 77

2 Answers2

1

Unfortunately, WooCommerce rest API is base on WordPress. The registroute didn't have to monitor the all request exclude error. If you want to check the error code then go to status in WooCommerce. another easy way, you could check your HTTP server like apache or Nginx then the access log would list.

If you want to monitor the WooCommerce log without other logs. There is another solution to solve by install REST API Log. Click Routes then tik Only Matching Filters option. Fill the fields /wc/v3/* , /wc/v2/* , /wc/v1/* to matching what endpoint you need.

Rach Chen
  • 1,322
  • 2
  • 10
  • 26
0

what language are you using. For me im using angularjs which if u want to view the logs

this is the sample code

var Woocommerce = WC.WC();

        Woocommerce.get('orders', function (err, data, res) {
            if (err)
                console.log(err);

            console.log(JSON.parse(res));

once u run the code. ctrl+shift+J to open browser console to see the logs.

LoneMan9
  • 1
  • 3