woocommerce_product_variation_title_attributes_separator

woocommerce_product_variation_title_attributes_separator

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_product_variation_title_attributes_separator') is found 5 times:

  • /includes/data-stores/class-wc-product-variation-data-store-cpt.php line 309
    			}
    		}
    
    		$should_include_attributes = apply_filters( 'woocommerce_product_variation_title_include_attributes', $should_include_attributes, $product );
    		$separator                 = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', $product );
    		$title_base                = get_post_field( 'post_title', $product->get_parent_id() );
    		$title_suffix              = $should_include_attributes ? wc_get_formatted_variation( $product, true, false ) : '';
    
    		return apply_filters( 'woocommerce_product_variation_title', $title_suffix ? $title_base . $separator . $title_suffix : $title_base, $product, $title_base, $title_suffix );
    	}
    
    
  • /src/Admin/API/Reports/Orders/DataStore.php line 369
    				 * Used to determine the separator for products and their variations titles.
    				 *
    				 * @since 4.0.0
    				 */
    				$separator = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', $variation );
    
    				if ( false === strpos( $product_data['name'], $separator ) ) {
    					$attributes            = wc_get_formatted_variation( $variation, true, false );
    					$product_data['name'] .= $separator . $attributes;
    				}
    			}
    
  • /src/Admin/API/Reports/Segmenter.php line 387
    			foreach ( $segment_objects as $segment ) {
    				$id           = $segment->get_id();
    				$segments[]   = $id;
    				$product_name = $segment->get_name();
    				$separator    = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', $segment );
    				$attributes   = wc_get_formatted_variation( $segment, true, false );
    
    				$segment_labels[ $id ] = $product_name . $separator . $attributes;
    			}
    
    			// If no variations were specified, add a segment for the parent product (variation = 0).
    
  • /src/Internal/Admin/Loader.php line 372
    		// We may have synced orders with a now-unregistered status.
    		// E.g An extension that added statuses is now inactive or removed.
    		$settings['unregisteredOrderStatuses'] = self::get_unregistered_order_statuses();
    		// The separator used for attributes found in Variation titles.
    		$settings['variationTitleAttributesSeparator'] = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', new \WC_Product() );
    
    		if ( ! empty( $preload_data_endpoints ) ) {
    			$settings['dataEndpoints'] = isset( $settings['dataEndpoints'] )
    				? $settings['dataEndpoints']
    				: [];
    			foreach ( $preload_data_endpoints as $key => $endpoint ) {
    
  • /src/Internal/Admin/Settings.php line 212
    		// E.g An extension that added statuses is now inactive or removed.
    		$settings['unregisteredOrderStatuses'] = $this->get_unregistered_order_statuses();
    		// The separator used for attributes found in Variation titles.
    		//phpcs:ignore
    		$settings['variationTitleAttributesSeparator'] = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', new \WC_Product() );
    
    		if ( ! empty( $preload_data_endpoints ) ) {
    			$settings['dataEndpoints'] = isset( $settings['dataEndpoints'] )
    				? $settings['dataEndpoints']
    				: array();
    			foreach ( $preload_data_endpoints as $key => $endpoint ) {