WordPress at Your Fingertips
function is not described

WC_Post_Data::transition_post_status() public WC 1.0

When a post status changes.

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

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Post_Data::transition_post_status( $new_status, $old_status, $post );
$new_status(string) (required)
New status.
$old_status(string) (required)
Old status.
$post(WP_Post) (required)
Post data.

Code of WC_Post_Data::transition_post_status() WC 5.7.0

public static function transition_post_status( $new_status, $old_status, $post ) {
	if ( ( 'publish' === $new_status || 'publish' === $old_status ) && in_array( $post->post_type, array( 'product', 'product_variation' ), true ) ) {
		self::delete_product_query_transients();
	}
}