woocommerce_image_sizes_to_resize хук-фильтр . WC 1.0
If an intermediate size meta differs from the actual image size (settings were changed?) return false so the wrong size is not used.
Использование
add_filter( 'woocommerce_image_sizes_to_resize', 'filter_function_name_4464' ); function filter_function_name_4464( $data ){ // filter... return $data; }
- $data(массив)
- Size data.
Где вызывается хук
woocommerce_image_sizes_to_resize
woocommerce_image_sizes_to_resize
woocommerce/includes/class-wc-regenerate-images.php 71
if ( ! is_string( $size ) || ! in_array( $size, apply_filters( 'woocommerce_image_sizes_to_resize', array( 'woocommerce_thumbnail', 'woocommerce_gallery_thumbnail', 'woocommerce_single', 'shop_thumbnail', 'shop_catalog', 'shop_single' ) ), true ) ) {
woocommerce/includes/class-wc-regenerate-images.php 207
if ( ! $image || ! in_array( $size, apply_filters( 'woocommerce_image_sizes_to_resize', array( 'woocommerce_thumbnail', 'woocommerce_gallery_thumbnail', 'woocommerce_single', 'shop_thumbnail', 'shop_catalog', 'shop_single' ) ), true ) ) {