WordPress at Your Fingertips
function is not described

wc_prepare_attachment_for_js() WC 1.0

Prepare attachment for JavaScript.

No Hooks.

Return

Array.

Usage

wc_prepare_attachment_for_js( $response );
$response(array) (required)
JS version of a attachment post object.

Code of wc_prepare_attachment_for_js() WC 5.5.2

<?php
function wc_prepare_attachment_for_js( $response ) {

	if ( isset( $response['url'] ) && strstr( $response['url'], 'woocommerce_uploads/' ) ) {
		$response['full']['url'] = wc_placeholder_img_src();
		if ( isset( $response['sizes'] ) ) {
			foreach ( $response['sizes'] as $size => $value ) {
				$response['sizes'][ $size ]['url'] = wc_placeholder_img_src();
			}
		}
	}

	return $response;
}