woocommerce_api_create_customer_data

woocommerce_api_create_customer_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_create_customer_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-customers.php line 359
    			if ( ! current_user_can( 'create_users' ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_customer', __( 'You do not have permission to create this customer', 'woocommerce' ), 401 );
    			}
    
    			$data = apply_filters( 'woocommerce_api_create_customer_data', $data, $this );
    
    			// Checks with the email is missing.
    			if ( ! isset( $data['email'] ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_missing_customer_email', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'email' ), 400 );
    			}
    
    
  • /includes/legacy/api/v3/class-wc-api-customers.php line 360
    			if ( ! current_user_can( 'create_users' ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_customer', __( 'You do not have permission to create this customer', 'woocommerce' ), 401 );
    			}
    
    			$data = apply_filters( 'woocommerce_api_create_customer_data', $data, $this );
    
    			// Checks with the email is missing.
    			if ( ! isset( $data['email'] ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_missing_customer_email', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'email' ), 400 );
    			}