Avoid a "method should not be called statically"
Declare `WC_Post_Data::transition_post_status()` as `static`. Avoids a PHP notice.
This commit is contained in:
parent
c66f2b8232
commit
3ed17d1b05
|
@ -49,7 +49,7 @@ class WC_Post_Data {
|
||||||
/**
|
/**
|
||||||
* When a post status changes
|
* 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' ) ) ) {
|
if ( ( 'publish' === $new_status || 'publish' === $old_status ) && in_array( $post->post_type, array( 'product', 'product_variation' ) ) ) {
|
||||||
self::delete_product_query_transients();
|
self::delete_product_query_transients();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue