WordPress at Your Fingertips
function is not described

WC_Post_Data::get_post_type() private WC 1.0

Get the post type for a given post.

{} It's a method of the class: WC_Post_Data{}

No Hooks.


String. The post type.


$result = WC_Post_Data::get_post_type( $id );
$id(int) (required)
The post id.

Code of WC_Post_Data::get_post_type() WC 5.6.0

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