WC_Post_Data::get_post_type
Get the post type for a given post.
Method of the class: WC_Post_Data{}
No Hooks.
Returns
String. The post type.
Usage
$result = WC_Post_Data::get_post_type( $id );
- $id(int) (required)
- The post id.
WC_Post_Data::get_post_type() WC Post Data::get post type code WC 10.8.1
private static function get_post_type( $id ) {
return wc_get_container()->get( LegacyProxy::class )->call_function( 'get_post_type', $id );
}