woocommerce_csv_exporter_fopen_mode filter-hookWC 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,;
either (r, r+, w, w+, a, a+, x, x+, c, c+, e)


Since 6.8.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.