woocommerce_csv_exporter_fopen_mode хук-фильтрWC 6.8.0

Filters the mode parameter which specifies the type of access you require to the stream (used during file writing for CSV exports). Defaults to 'a+' (which supports both reading and writing, and places the file pointer at the end of the file).

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

add_filter( 'woocommerce_csv_exporter_fopen_mode', 'wp_kama_woocommerce_csv_exporter_fopen_mode_filter' );

/**
 * Function for `woocommerce_csv_exporter_fopen_mode` filter-hook.
 * 
 * @param string $fopen_mode, either (r, r+, w, w+, a, a+, x, x+, c, c+, e)
 *
 * @return string
 */
function wp_kama_woocommerce_csv_exporter_fopen_mode_filter( $fopen_mode, ){

	// filter...
	return $fopen_mode,;
}
$fopen_mode,(строка)
either (r, r+, w, w+, a, a+, x, x+, c, c+, e)

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

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

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

WC_CSV_Batch_Exporter::write_csv_data()
woocommerce_csv_exporter_fopen_mode
woocommerce/includes/export/abstract-wc-csv-batch-exporter.php 150
$fopen_mode = apply_filters( 'woocommerce_csv_exporter_fopen_mode', 'a+' );

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

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