WC_Post_Data::filter_oembed_response_data()public staticWC 3.2.0

Change embed data for certain post types.

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

Хуков нет.

Возвращает

Массив.

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

$result = WC_Post_Data::filter_oembed_response_data( $data, $post );
$data(массив) (обязательный)
The response data.
$post(WP_Post) (обязательный)
The post object.

Список изменений

С версии 3.2.0 Введена.

Код WC_Post_Data::filter_oembed_response_data() WC 8.7.0

public static function filter_oembed_response_data( $data, $post ) {
	if ( in_array( $post->post_type, array( 'shop_order', 'shop_coupon' ), true ) ) {
		return array();
	}
	return $data;
}