added route to create customers via api

This commit is contained in:
claudiosmweb 2014-03-03 21:13:44 -03:00
parent 14b63541a3
commit 371665cd79
1 changed files with 2 additions and 1 deletions

View File

@ -55,9 +55,10 @@ class WC_API_Customers extends WC_API_Resource {
*/
public function register_routes( $routes ) {
# GET /customers
# GET/POST /customers
$routes[ $this->base ] = array(
array( array( $this, 'get_customers' ), WC_API_SERVER::READABLE ),
array( array( $this, 'create_customer' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),
);
# GET /customers/count