WC_GZD_Admin_Status

WC_Admin_GZD_Status Class.

Defined (1)

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

/includes/admin/class-wc-gzd-admin-status.php  
  1. class WC_GZD_Admin_Status extends WC_Admin_Status { 
  2.  
  3. public static $tax_tables = array( 
  4. 'woocommerce_tax_rates',  
  5. 'woocommerce_tax_rate_locations',  
  6. ); 
  7.  
  8. public static function output() { 
  9. include_once( 'views/html-page-status.php' ); 
  10.  
  11. public static function germanized() { 
  12. include_once( 'views/html-page-status-germanized.php' ); 
  13.  
  14. public static function status_default( $status ) { 
  15. do_action( 'woocommerce_gzd_status_' . $status ); 
  16.  
  17. public static function get_legal_pages() { 
  18.  
  19. $return = array(); 
  20.  
  21. $pages = array( 
  22. 'terms' => __( 'Terms & Conditions', 'woocommerce-germanized' ),  
  23. 'revocation' => __( 'Power of Revocation', 'woocommerce-germanized' ),  
  24. 'imprint' => __( 'Imprint', 'woocommerce-germanized' ),  
  25. 'data_security' => __( 'Data Security Statement', 'woocommerce-germanized' ),  
  26. 'payment_methods' => __( 'Payment Methods', 'woocommerce-germanized' ),  
  27. 'shipping_costs' => __( 'Shipping Methods', 'woocommerce-germanized' ),  
  28. ); 
  29.  
  30. foreach ( $pages as $page => $title ) 
  31. $return[ $page ] = array( 'title' => $title, 'id' => get_option( 'woocommerce_' . $page . '_page_id' ) ); 
  32.  
  33. return $return; 
  34.  
  35.  
  36. public static function tax_tables_exist() { 
  37.  
  38. global $wpdb; 
  39.  
  40. foreach ( self::$tax_tables as $table ) { 
  41. if ( ! $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->prefix}{$table}';" ) ) 
  42. return false; 
  43.  
  44. return true; 
  45.  
  46. public static function get_missing_tax_tables() { 
  47. global $wpdb; 
  48. $missing = array(); 
  49.  
  50. foreach ( self::$tax_tables as $table ) { 
  51. if ( ! $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->prefix}{$table}';" ) ) 
  52. array_push( $missing, $table ); 
  53.  
  54. return $missing; 
  55.