woocommerce_csv_import_valid_filetypes
Filter CSV valid file types.
Использование
add_filter( 'woocommerce_csv_import_valid_filetypes', 'wp_kama_woocommerce_csv_import_valid_filetypes_filter' ); /** * Function for `woocommerce_csv_import_valid_filetypes` filter-hook. * * @param array $valid_filetypes List of valid file types. * * @return array */ function wp_kama_woocommerce_csv_import_valid_filetypes_filter( $valid_filetypes ){ // filter... return $valid_filetypes; }
- $valid_filetypes(массив)
- List of valid file types.
Список изменений
С версии 3.6.5 | Введена. |
Где вызывается хук
woocommerce_csv_import_valid_filetypes
woocommerce/includes/wc-conditional-functions.php 483-489
$valid_filetypes = apply_filters( 'woocommerce_csv_import_valid_filetypes', array( 'csv' => 'text/csv', 'txt' => 'text/plain', ) );