woocommerce_rest_allowed_image_mime_types хук-фильтрWC 2.6.4

Returns image mime types users are allowed to upload via the API.

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

add_filter( 'woocommerce_rest_allowed_image_mime_types', 'wp_kama_woocommerce_rest_allowed_image_mime_types_filter' );

/**
 * Function for `woocommerce_rest_allowed_image_mime_types` filter-hook.
 * 
 * @param  $array 
 *
 * @return 
 */
function wp_kama_woocommerce_rest_allowed_image_mime_types_filter( $array ){

	// filter...
	return $array;
}
$array
-

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

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

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

wc_rest_allowed_image_mime_types()
woocommerce_rest_allowed_image_mime_types
woocommerce/includes/wc-rest-functions.php 48-59
return apply_filters(
	'woocommerce_rest_allowed_image_mime_types',
	array(
		'jpg|jpeg|jpe' => 'image/jpeg',
		'gif'          => 'image/gif',
		'png'          => 'image/png',
		'bmp'          => 'image/bmp',
		'tiff|tif'     => 'image/tiff',
		'ico'          => 'image/x-icon',
		'webp'         => 'image/webp',
	)
);

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

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