From 8464ad0b174b97ce43df1ab28db32d795eb10eb6 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Mon, 15 Sep 2014 22:10:20 -0300 Subject: [PATCH] improved the WC_Admin_Post_Types::media_view_strings() --- includes/admin/class-wc-admin-post-types.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index e0454a3d248..b9e988a466b 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1870,9 +1870,7 @@ class WC_Admin_Post_Types { * @return array */ public function media_view_strings( $strings = array(), $post = null ) { - $screen = get_current_screen(); - - if ( 'product' == $screen->id ) { + if ( isset( $post->post_type ) && 'product' == $post->post_type ) { $strings['setFeaturedImageTitle'] = __( 'Set product image', 'woocommerce' ); $strings['setFeaturedImage'] = __( 'Set product image', 'woocommerce' ); }