Wording and move report location
This commit is contained in:
parent
3e7968d37b
commit
eedf745430
|
@ -11,10 +11,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Reports', false ) ) :
|
if ( class_exists( 'WC_Admin_Reports', false ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Reports Class.
|
* WC_Admin_Reports Class.
|
||||||
|
@ -44,42 +46,48 @@ class WC_Admin_Reports {
|
||||||
'orders' => array(
|
'orders' => array(
|
||||||
'title' => __( 'Orders', 'woocommerce' ),
|
'title' => __( 'Orders', 'woocommerce' ),
|
||||||
'reports' => array(
|
'reports' => array(
|
||||||
"sales_by_date" => array(
|
'sales_by_date' => array(
|
||||||
'title' => __( 'Sales by date', 'woocommerce' ),
|
'title' => __( 'Sales by date', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
),
|
),
|
||||||
"sales_by_product" => array(
|
'sales_by_product' => array(
|
||||||
'title' => __( 'Sales by product', 'woocommerce' ),
|
'title' => __( 'Sales by product', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
),
|
),
|
||||||
"sales_by_category" => array(
|
'sales_by_category' => array(
|
||||||
'title' => __( 'Sales by category', 'woocommerce' ),
|
'title' => __( 'Sales by category', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
),
|
),
|
||||||
"coupon_usage" => array(
|
'coupon_usage' => array(
|
||||||
'title' => __( 'Coupons by date', 'woocommerce' ),
|
'title' => __( 'Coupons by date', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
),
|
),
|
||||||
|
'downloads' => array(
|
||||||
|
'title' => __( 'Customer downloads', 'woocommerce' ),
|
||||||
|
'description' => '',
|
||||||
|
'hide_title' => false,
|
||||||
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'customers' => array(
|
'customers' => array(
|
||||||
'title' => __( 'Customers', 'woocommerce' ),
|
'title' => __( 'Customers', 'woocommerce' ),
|
||||||
'reports' => array(
|
'reports' => array(
|
||||||
"customers" => array(
|
'customers' => array(
|
||||||
'title' => __( 'Customers vs. guests', 'woocommerce' ),
|
'title' => __( 'Customers vs. guests', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
),
|
),
|
||||||
"customer_list" => array(
|
'customer_list' => array(
|
||||||
'title' => __( 'Customer list', 'woocommerce' ),
|
'title' => __( 'Customer list', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
|
@ -90,19 +98,19 @@ class WC_Admin_Reports {
|
||||||
'stock' => array(
|
'stock' => array(
|
||||||
'title' => __( 'Stock', 'woocommerce' ),
|
'title' => __( 'Stock', 'woocommerce' ),
|
||||||
'reports' => array(
|
'reports' => array(
|
||||||
"low_in_stock" => array(
|
'low_in_stock' => array(
|
||||||
'title' => __( 'Low in stock', 'woocommerce' ),
|
'title' => __( 'Low in stock', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
),
|
),
|
||||||
"out_of_stock" => array(
|
'out_of_stock' => array(
|
||||||
'title' => __( 'Out of stock', 'woocommerce' ),
|
'title' => __( 'Out of stock', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
),
|
),
|
||||||
"most_stocked" => array(
|
'most_stocked' => array(
|
||||||
'title' => __( 'Most stocked', 'woocommerce' ),
|
'title' => __( 'Most stocked', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
|
@ -110,30 +118,19 @@ class WC_Admin_Reports {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'products' => array(
|
|
||||||
'title' => __( 'Products', 'woocommerce' ),
|
|
||||||
'reports' => array(
|
|
||||||
'downloads' => array(
|
|
||||||
'title' => __( 'Product downloads', 'woocommerce' ),
|
|
||||||
'description' => '',
|
|
||||||
'hide_title' => false,
|
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( wc_tax_enabled() ) {
|
if ( wc_tax_enabled() ) {
|
||||||
$reports['taxes'] = array(
|
$reports['taxes'] = array(
|
||||||
'title' => __( 'Taxes', 'woocommerce' ),
|
'title' => __( 'Taxes', 'woocommerce' ),
|
||||||
'reports' => array(
|
'reports' => array(
|
||||||
"taxes_by_code" => array(
|
'taxes_by_code' => array(
|
||||||
'title' => __( 'Taxes by code', 'woocommerce' ),
|
'title' => __( 'Taxes by code', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
'callback' => array( __CLASS__, 'get_report' ),
|
'callback' => array( __CLASS__, 'get_report' ),
|
||||||
),
|
),
|
||||||
"taxes_by_date" => array(
|
'taxes_by_date' => array(
|
||||||
'title' => __( 'Taxes by date', 'woocommerce' ),
|
'title' => __( 'Taxes by date', 'woocommerce' ),
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'hide_title' => true,
|
'hide_title' => true,
|
||||||
|
@ -180,5 +177,3 @@ class WC_Admin_Reports {
|
||||||
$report->output_report();
|
$report->output_report();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endif;
|
|
||||||
|
|
|
@ -176,11 +176,11 @@ class WC_Report_Downloads extends WP_List_Table {
|
||||||
public function get_columns() {
|
public function get_columns() {
|
||||||
|
|
||||||
$columns = array(
|
$columns = array(
|
||||||
'timestamp' => __( 'Download time', 'woocommerce' ),
|
'timestamp' => __( 'Timestamp', 'woocommerce' ),
|
||||||
'product' => __( 'Product', 'woocommerce' ),
|
'product' => __( 'Product', 'woocommerce' ),
|
||||||
'order' => __( 'Order', 'woocommerce' ),
|
'order' => __( 'Order', 'woocommerce' ),
|
||||||
'user' => __( 'User', 'woocommerce' ),
|
'user' => __( 'User', 'woocommerce' ),
|
||||||
'user_ip_address' => __( 'User IP Address', 'woocommerce' ),
|
'user_ip_address' => __( 'IP Address', 'woocommerce' ),
|
||||||
);
|
);
|
||||||
|
|
||||||
return $columns;
|
return $columns;
|
||||||
|
@ -212,7 +212,7 @@ class WC_Report_Downloads extends WP_List_Table {
|
||||||
* No items found text.
|
* No items found text.
|
||||||
*/
|
*/
|
||||||
public function no_items() {
|
public function no_items() {
|
||||||
_e( 'No downloads found.', 'woocommerce' );
|
esc_html_e( 'No customer downloads has been tracked yet.', 'woocommerce' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue