WC_Meta_Box_Product_Images::get_media_gallery_json
Encode media gallery items for the hidden form field.
Метод класса: WC_Meta_Box_Product_Images{}
Хуков нет.
Возвращает
string.
Использование
$result = WC_Meta_Box_Product_Images::get_media_gallery_json( $media_gallery );
- $media_gallery(массив) (обязательный)
- Media gallery items.
Код WC_Meta_Box_Product_Images::get_media_gallery_json() WC Meta Box Product Images::get media gallery json WC 11.3.0
private static function get_media_gallery_json( $media_gallery ) {
$json = wp_json_encode( $media_gallery );
return false === $json ? '[]' : $json;
}