WC_Post_Data::get_post_type()
Get the post type for a given post.
Method of the class: WC_Post_Data{}
No Hooks.
Return
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 8.7.0
private static function get_post_type( $id ) { return wc_get_container()->get( LegacyProxy::class )->call_function( 'get_post_type', $id ); }