public function get_by_sku( $sku, $args = array() ) {

		$this->set_request_args( array(
			'method' => 'GET',
			'path'   => array( 'sku', urlencode( $sku ) ),
			'params' => $args,
		) );

		return $this->do_request();
	}
public function get_by_sku( $sku, $args = array() ) {

		$this->set_request_args( array(
			'method' => 'GET',
			'path'   => array( 'sku', urlencode( $sku ) ),
			'params' => $args,
		) );

		return $this->do_request();
	}
public function get_by_sku ( $ sku , $ args = array ( ) ) { $ this -> set_request_args ( array ( 'method' => 'GET' , 'path' => array ( 'sku' , urlencode ( $ sku ) ) , 'params' => $ args , ) ) ; return $ this -> do_request ( ) ; }
Get product by SKU

GET /products/sku/{sku}

Note this will throw an exception if no products are found (404 not found)

@since 2.0
@param string $sku product SKU
@param array $args acceptable product SKU lookup endpoint args, currently only `fields`
@return array|object product!
Get product by SKU