[API] Accept dashes in products/sku endpoint, closes #8220

This commit is contained in:
Claudio Sanches 2015-05-25 10:22:59 -03:00
parent 70b33b7919
commit 9c5cd0e525
1 changed files with 1 additions and 4 deletions

View File

@ -85,10 +85,7 @@ class WC_API_Products extends WC_API_Resource {
);
# GET /products/sku/<product sku>
/**
* Deprecated since 2.4.0
*/
$routes[ $this->base . '/sku/(?P<sku>\w+)' ] = array(
$routes[ $this->base . '/sku/(?P<sku>\w[\w\s\-]*)' ] = array(
array( array( $this, 'get_product_by_sku' ), WC_API_Server::READABLE ),
);