woocommerce_product_variation_title_attributes_separator хук-фильтрWC 4.0.0

Used to determine the separator for products and their variations titles.

Использование

add_filter( 'woocommerce_product_variation_title_attributes_separator', 'wp_kama_woocommerce_product_variation_title_attributes_separator_filter', 10, 2 );

/**
 * Function for `woocommerce_product_variation_title_attributes_separator` filter-hook.
 * 
 * @param  $string    
 * @param  $variation 
 *
 * @return 
 */
function wp_kama_woocommerce_product_variation_title_attributes_separator_filter( $string, $variation ){

	// filter...
	return $string;
}
$string
-
$variation
-

Список изменений

С версии 4.0.0 Введена.

Где вызывается хук

DataStore::include_extended_info()
Loader::add_component_settings()
woocommerce_product_variation_title_attributes_separator
Settings::add_component_settings()
woocommerce_product_variation_title_attributes_separator
Segmenter::set_all_segments()
woocommerce_product_variation_title_attributes_separator
WC_Product_Variation_Data_Store_CPT::generate_product_title()
woocommerce_product_variation_title_attributes_separator
woocommerce/src/Admin/API/Reports/Orders/DataStore.php 374
$separator = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', $variation );
woocommerce/src/Internal/Admin/Loader.php 385
$settings['variationTitleAttributesSeparator'] = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', new \WC_Product() );
woocommerce/src/Internal/Admin/Settings.php 212
$settings['variationTitleAttributesSeparator'] = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', new \WC_Product() );
woocommerce/src/Admin/API/Reports/Segmenter.php 387
$separator    = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', $segment );
woocommerce/includes/data-stores/class-wc-product-variation-data-store-cpt.php 309
$separator                 = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', $product );

Где используется хук в WooCommerce

Использование не найдено.