WooCommerce Rest API get products by slug
<p>New to WooCommerce, and using the REST API to get products which I have successfully done. </p>

<p>Not sure on how to get a single product using the <code>slug</code> as permalink gives full url, where as i only need the end slug so I can have clean urls and not use the <code>id</code> to find a record. I know with the Wordpress rest api plugin you can do this <code>posts-api?filter[name]==</code> and get the post by product slug, rather than use:</p>

<pre><code>/wc-api/v3/products/id
</code></pre>

<p>I want to be able to do:</p>

<pre><code>/wc-api/v3/products/slug
</code></pre>