wc_rest_allowed_image_mime_types

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

Description

(array) wc_rest_allowed_image_mime_types(); 

Returns (array)


Usage

  1. if ( !function_exists( 'wc_rest_allowed_image_mime_types' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-rest-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_rest_allowed_image_mime_types(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-rest-functions.php  
  1. function wc_rest_allowed_image_mime_types() { 
  2. return apply_filters( 'woocommerce_rest_allowed_image_mime_types', array( 
  3. 'jpg|jpeg|jpe' => 'image/jpeg',  
  4. 'gif' => 'image/gif',  
  5. 'png' => 'image/png',  
  6. 'bmp' => 'image/bmp',  
  7. 'tiff|tif' => 'image/tiff',  
  8. 'ico' => 'image/x-icon',  
  9. ) );