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-germanized.php' ); 
  10.  
  11. public static function status_default( $status ) { 
  12. do_action( 'woocommerce_gzd_status_' . $status ); 
  13.  
  14. public static function get_legal_pages() { 
  15.  
  16. $return = array(); 
  17.  
  18. $pages = array( 
  19. 'terms' => __( 'Terms & Conditions', 'woocommerce-germanized' ),  
  20. 'revocation' => __( 'Power of Revocation', 'woocommerce-germanized' ),  
  21. 'imprint' => __( 'Imprint', 'woocommerce-germanized' ),  
  22. 'data_security' => __( 'Data Security Statement', 'woocommerce-germanized' ),  
  23. 'payment_methods' => __( 'Payment Methods', 'woocommerce-germanized' ),  
  24. 'shipping_costs' => __( 'Shipping Methods', 'woocommerce-germanized' ),  
  25. ); 
  26.  
  27. foreach ( $pages as $page => $title ) 
  28. $return[ $page ] = array( 'title' => $title, 'id' => get_option( 'woocommerce_' . $page . '_page_id' ) ); 
  29.  
  30. return $return; 
  31.  
  32.  
  33. public static function tax_tables_exist() { 
  34.  
  35. global $wpdb; 
  36.  
  37. foreach ( self::$tax_tables as $table ) { 
  38. if ( ! $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->prefix}{$table}';" ) ) 
  39. return false; 
  40.  
  41. return true; 
  42.  
  43. public static function get_missing_tax_tables() { 
  44. global $wpdb; 
  45. $missing = array(); 
  46.  
  47. foreach ( self::$tax_tables as $table ) { 
  48. if ( ! $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->prefix}{$table}';" ) ) 
  49. array_push( $missing, $table ); 
  50.  
  51. return $missing; 
  52.