WC_Post_Data::filter_oembed_response_data
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 Post Data::filter oembed response data WC 10.3.4
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;
}