WC_POS_Admin

WP Admin Class.

Defined (1)

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

/includes/class-wc-pos-admin.php  
  1. class WC_POS_Admin { 
  2.  
  3. /** 
  4. * Constructor 
  5. */ 
  6. public function __construct() { 
  7. $this->init(); 
  8. add_action( 'current_screen', array( $this, 'conditional_init' ) ); 
  9.  
  10. /** 
  11. * Load admin subclasses 
  12. */ 
  13. public function init() { 
  14. new WC_POS_Admin_Menu(); 
  15. new WC_POS_Admin_Settings(); 
  16.  
  17. /** 
  18. * Conditionally load subclasses 
  19. * @param $current_screen 
  20. */ 
  21. public function conditional_init( $current_screen ) { 
  22.  
  23. // Add setting to permalink page 
  24. if( $current_screen->id == 'options-permalink' ) 
  25. new WC_POS_Admin_Permalink(); 
  26.  
  27. // Add POS settings to orders pages 
  28. if( $current_screen->id == 'shop_order' || $current_screen->id == 'edit-shop_order' ) 
  29. new WC_POS_Admin_Orders(); 
  30.  
  31. // Customise plugins page 
  32. if( $current_screen->id == 'plugins' ) 
  33. new WC_POS_Admin_Plugins(); 
  34.  
  35.