woocommerce_rest_insert_customer

woocommerce_rest_insert_customer

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

do_action('woocommerce_rest_insert_customer') is found 2 times:

  • /includes/rest-api/Controllers/Version1/class-wc-rest-customers-v1-controller.php line 358
    			 * @param WP_User         $user_data Data used to create the customer.
    			 * @param WP_REST_Request $request   Request object.
    			 * @param boolean         $creating  True when creating customer, false when updating customer.
    			 */
    			do_action( 'woocommerce_rest_insert_customer', $user_data, $request, true );
    
    			$request->set_param( 'context', 'edit' );
    			$response = $this->prepare_item_for_response( $user_data, $request );
    			$response = rest_ensure_response( $response );
    			$response->set_status( 201 );
    			$response->header( 'Location', rest_url( sprintf( '/%s/%s/%d', $this->namespace, $this->rest_base, $customer->get_id() ) ) );
    
  • /includes/rest-api/Controllers/Version1/class-wc-rest-customers-v1-controller.php line 442
    			 * @param WP_User         $customer  Data used to create the customer.
    			 * @param WP_REST_Request $request   Request object.
    			 * @param boolean         $creating  True when creating customer, false when updating customer.
    			 */
    			do_action( 'woocommerce_rest_insert_customer', $user_data, $request, false );
    
    			$request->set_param( 'context', 'edit' );
    			$response = $this->prepare_item_for_response( $user_data, $request );
    			$response = rest_ensure_response( $response );
    			return $response;
    		} catch ( Exception $e ) {