WC_Post_Data::filter_oembed_response_data()
Change embed data for certain post types.
Method of the class: WC_Post_Data{}
No Hooks.
Return
Array
.
Usage
$result = WC_Post_Data::filter_oembed_response_data( $data, $post );
- $data(array) (required)
- The response data.
- $post(WP_Post) (required)
- The post object.
Changelog
Since 3.2.0 | Introduced. |
WC_Post_Data::filter_oembed_response_data() WC Post Data::filter oembed response data code 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; }