WooCommerce REST API AJAX Auth – 401 response

First off, the WooCommerce REST API documentation is available here and you should check it out. Secondly, the examples below are using the /wc/v3/products/categories (“List all product categories“) endpoint. And here’s a proper way to authenticate your request using OAuth — it always works when authenticating over HTTPS and it is the only accepted option … Read more

404 error custom post type rest api

You need to declare that your CPT supports REST via show_in_rest when registering it, then use the REST API endpoint for that post type. For example, I have a CPT on my own site for talks named tomjn_talks, and it has an endpoint at /wp/v2/tomjn_talks

WordPress Custom Rest Api – How to get Image Url?

$post->ad_1[0][‘top_image’] will not return you data, because you are not in JS which got response from your REST api which had injected ad_1 value into object which it returns to you. In your PHP code $post is of type WP_Post and it doesn’t have ad_1 in it, that’s why you getting nulls. I don’t know … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)