Avoid a "method should not be called statically" notice

Declare `WC_Post_Data::transition_post_status()` as `static`. Avoids a
PHP notice.

Fixes #5705

P.S. — Sorry I forgot to create the tickets before I made the commits, and therefore didn't include the ticket number in the actual commit message.