woocommerce_api_create_product_attribute_data

woocommerce_api_create_product_attribute_data

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_api_create_product_attribute_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-products.php line 1977
    			if ( ! current_user_can( 'manage_product_terms' ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_product_attribute', __( 'You do not have permission to create product attributes', 'woocommerce' ), 401 );
    			}
    
    			$data = apply_filters( 'woocommerce_api_create_product_attribute_data', $data, $this );
    
    			if ( ! isset( $data['name'] ) ) {
    				$data['name'] = '';
    			}
    
    			// Set the attribute slug
    
  • /includes/legacy/api/v3/class-wc-api-products.php line 2530
    			if ( ! current_user_can( 'manage_product_terms' ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_product_attribute', __( 'You do not have permission to create product attributes', 'woocommerce' ), 401 );
    			}
    
    			$data = apply_filters( 'woocommerce_api_create_product_attribute_data', $data, $this );
    
    			if ( ! isset( $data['name'] ) ) {
    				$data['name'] = '';
    			}
    
    			// Set the attribute slug.