Naguro_Modules_Page

The WooCommerce Naguro Connect Naguro Modules Page class.

Defined (1)

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

/includes/wordpress/pages/class-modules-page.php  
  1. class Naguro_Modules_Page extends Abstract_Naguro_WordPress_Settings_Page { 
  2. public function __construct() { 
  3. $this->output_tabs( 'modules' ); 
  4.  
  5. $this->display_module_list(); 
  6.  
  7. private function display_module_list() { 
  8. if ( isset( $_GET['naguro-module-deactivated'] ) ) { 
  9. $this->display_module_deactivated_message(); 
  10. } elseif ( isset( $_GET['naguro-module-activated'] ) ) { 
  11. $this->display_module_activated_message(); 
  12.  
  13. echo '<h3>Unlocked modules</h3>'; 
  14. $list = new Naguro_Modules_List(); 
  15. $list->prepare_items(); 
  16. $list->items = Naguro_Modules_Repository::get_unlocked_modules(); 
  17. $list->display(); 
  18.  
  19. echo '<h3>Available modules</h3>'; 
  20. echo '<p>These modules have not yet been unlocked. You can unlock them via your account on the Naguro website.</p>'; 
  21. $list = new Naguro_Modules_List(); 
  22. $list->prepare_items(); 
  23. $list->items = Naguro_Modules_Repository::get_locked_modules(); 
  24. $list->display(); 
  25.  
  26. private function display_module_deactivated_message() { 
  27. echo '<div id="message" class="updated">'; 
  28. echo '<p>Module has been deactivated</p>'; 
  29. echo '</div>'; 
  30.  
  31. private function display_module_activated_message() { 
  32. echo '<div id="message" class="updated">'; 
  33. echo '<p>Module has been activated</p>'; 
  34. echo '</div>';