ddw_wcde_get_woocommerce_screen_ids

Get all WooCommerce screen IDs for its admin pages.

Description

(array) ddw_wcde_get_woocommerce_screen_ids(); 

NOTE: Based on WooCommerce 2.1.0+ function, but with backwards compat!

Returns (array)

Array of IDs of various WooCommerce admin pages.


Usage

  1. if ( !function_exists( 'ddw_wcde_get_woocommerce_screen_ids' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-german-de_de/includes/wcde-admin-extras.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ddw_wcde_get_woocommerce_screen_ids(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wcde-admin-extras.php  
  1. function ddw_wcde_get_woocommerce_screen_ids() { 
  2.  
  3. $wc_screen_id = 'woocommerce'; //strtolower( __( 'WooCommerce', 'woocommerce' ) ); 
  4.  
  5. $wc_branch = ddw_wcde_woocommerce_current() ? 'wc-' : 'woocommerce_'; 
  6.  
  7. return apply_filters( 'wcde_filter_woocommerce_screen_ids', array( 
  8. 'toplevel_page_' . $wc_screen_id,  
  9. $wc_screen_id . '_page_' . $wc_branch . 'reports',  
  10. $wc_screen_id . '_page_' . $wc_branch . 'settings',  
  11. $wc_screen_id . '_page_' . $wc_branch . 'status',  
  12. $wc_screen_id . '_page_wc-addons',  
  13. 'dashboard_page_wc-about',  
  14. 'dashboard_page_wc-credits',  
  15. 'dashboard_page_wc-translators',  
  16. 'product_page_product_attributes',  
  17. 'edit-shop_order',  
  18. 'shop_order',  
  19. 'edit-product',  
  20. 'product',  
  21. 'edit-shop_coupon',  
  22. 'shop_coupon',  
  23. 'edit-product_cat',  
  24. 'edit-product_tag',  
  25. 'edit-product_shipping_class' 
  26. ) ); 
  27.  
  28. } // end of function ddw_wcde_get_woocommerce_screen_ids