WC_Post_Data::get_post_typeprivate staticWC 1.0

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() code WC 9.9.5

private static function get_post_type( $id ) {
	return wc_get_container()->get( LegacyProxy::class )->call_function( 'get_post_type', $id );
}