woocommerce_api_create_product_tag_data

woocommerce_api_create_product_tag_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_tag_data') is found 1 times:

  • /includes/legacy/api/v3/class-wc-api-products.php line 974
    				'description' => '',
    			);
    
    			$data = wp_parse_args( $data['product_tag'], $defaults );
    			$data = apply_filters( 'woocommerce_api_create_product_tag_data', $data, $this );
    
    			$insert = wp_insert_term( $data['name'], 'product_tag', $data );
    			if ( is_wp_error( $insert ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_cannot_create_product_tag', $insert->get_error_message(), 400 );
    			}
    			$id = $insert['term_id'];