From 3ed17d1b051681361a784a59f955cb3156e58f88 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 19 Jun 2014 11:32:52 -0400 Subject: [PATCH] Avoid a "method should not be called statically" Declare `WC_Post_Data::transition_post_status()` as `static`. Avoids a PHP notice. --- includes/class-wc-post-data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-post-data.php b/includes/class-wc-post-data.php index 57e75065e65..7b5dc99443a 100644 --- a/includes/class-wc-post-data.php +++ b/includes/class-wc-post-data.php @@ -49,7 +49,7 @@ class WC_Post_Data { /** * When a post status changes */ - public function transition_post_status( $new_status, $old_status, $post ) { + 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' ) ) ) { self::delete_product_query_transients(); }