WC_API_Customers::delete_customer( int $id )
Delete a customer
Description Description
Parameters Parameters
- $id
-
(Required) the customer ID
Return Return
(array|WP_Error)
Source Source
File: includes/legacy/api/v2/class-wc-api-customers.php
public function delete_customer( $id ) { // Validate the customer ID. $id = $this->validate_request( $id, 'customer', 'delete' ); // Return the validate error. if ( is_wp_error( $id ) ) { return $id; } do_action( 'woocommerce_api_delete_customer', $id, $this ); return $this->delete( $id, 'customer' ); }
Changelog Changelog
Version | Description |
---|---|
2.2 | Introduced. |