WC_Post_Data::get_post_type │ private static │ WC 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 11.1.2

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