Automattic\WooCommerce\Internal\ProductDownloads

DownloadableFileAttachments::handle_oembed_response_data │ public │ WC 1.0

Return no oEmbed data for downloadable product files, which would otherwise include the URL of an image file.

Метод класса: DownloadableFileAttachments{}

Хуков нет.

Возвращает

array|false|mixed.

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

$DownloadableFileAttachments = new DownloadableFileAttachments();
$DownloadableFileAttachments->handle_oembed_response_data( $data, $post );
$data(массив|false|разное) (обязательный)
oEmbed response data.
$post(WP_Post|null|разное) (обязательный)
Post the data was generated for.

Код DownloadableFileAttachments::handle_oembed_response_data() WC 11.3.0

public function handle_oembed_response_data( $data, $post ) {
	return ( $post instanceof WP_Post && $this->is_hidden_attachment( $post->ID ) ) ? false : $data;
}