From e7224cdc1dbcfb3953681c5cc71599948d0841d8 Mon Sep 17 00:00:00 2001 From: Patrick Rauland Date: Wed, 28 Jan 2015 17:20:38 -0700 Subject: [PATCH] using wc_get_screen_ids instead of manually typing them out. see #7213 --- includes/admin/class-wc-admin.php | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/includes/admin/class-wc-admin.php b/includes/admin/class-wc-admin.php index d8ff822d167..27f48f8d1ef 100644 --- a/includes/admin/class-wc-admin.php +++ b/includes/admin/class-wc-admin.php @@ -148,25 +148,8 @@ class WC_Admin { public function admin_footer_text( $footer_text ) { global $current_screen; - // list of admin pages we want this to appear on - $pages = array( - 'woocommerce_page_wc-settings', - 'edit-shop_order', - 'shop_order', - 'edit-shop_coupon', - 'shop_coupon', - 'woocommerce_page_wc-reports', - 'woocommerce_page_wc-addons', - 'edit-product', - 'product', - 'edit-product_cat', - 'edit-product_tag', - 'edit-product_shipping_class', - 'product_page_product_attributes' - ); - // check to make sure we're on a WooCommerce admin page - if ( isset( $current_screen->id ) && in_array( $current_screen->id, $pages ) ) { + if ( isset( $current_screen->id ) && in_array( $current_screen->id, wc_get_screen_ids() ) ) { // change the footer text $footer_text = sprintf( __( 'Please rate WooCommerce ★★★★★ on WordPress.org to help us keep this plugin free. A huge thank you from WooThemes!', 'woocommerce' ), __( 'https://wordpress.org/support/view/plugin-reviews/woocommerce?filter=5', 'woocommerce' ) ); }