How to see WooCommerce API Log
Asked Answered
S

2

8

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?

Spotless answered 8/8, 2016 at 17:15 Comment(0)
D
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.

Drugge answered 6/7, 2021 at 1:45 Comment(0)
A
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.

Accompany answered 19/9, 2016 at 16:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.