Wording and move report location
This commit is contained in:
parent
3e7968d37b
commit
eedf745430
|
@ -11,10 +11,12 @@
|
|||
*/
|
||||
|
||||
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.
|
||||
|
@ -44,42 +46,48 @@ class WC_Admin_Reports {
|
|||
'orders' => array(
|
||||
'title' => __( 'Orders', 'woocommerce' ),
|
||||
'reports' => array(
|
||||
"sales_by_date" => array(
|
||||
'sales_by_date' => array(
|
||||
'title' => __( 'Sales by date', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
"sales_by_product" => array(
|
||||
'sales_by_product' => array(
|
||||
'title' => __( 'Sales by product', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
"sales_by_category" => array(
|
||||
'sales_by_category' => array(
|
||||
'title' => __( 'Sales by category', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
"coupon_usage" => array(
|
||||
'coupon_usage' => array(
|
||||
'title' => __( 'Coupons by date', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
'downloads' => array(
|
||||
'title' => __( 'Customer downloads', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => false,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
'customers' => array(
|
||||
'title' => __( 'Customers', 'woocommerce' ),
|
||||
'reports' => array(
|
||||
"customers" => array(
|
||||
'customers' => array(
|
||||
'title' => __( 'Customers vs. guests', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
"customer_list" => array(
|
||||
'customer_list' => array(
|
||||
'title' => __( 'Customer list', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
|
@ -90,19 +98,19 @@ class WC_Admin_Reports {
|
|||
'stock' => array(
|
||||
'title' => __( 'Stock', 'woocommerce' ),
|
||||
'reports' => array(
|
||||
"low_in_stock" => array(
|
||||
'low_in_stock' => array(
|
||||
'title' => __( 'Low in stock', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
"out_of_stock" => array(
|
||||
'out_of_stock' => array(
|
||||
'title' => __( 'Out of stock', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
"most_stocked" => array(
|
||||
'most_stocked' => array(
|
||||
'title' => __( 'Most stocked', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'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() ) {
|
||||
$reports['taxes'] = array(
|
||||
'title' => __( 'Taxes', 'woocommerce' ),
|
||||
'reports' => array(
|
||||
"taxes_by_code" => array(
|
||||
'taxes_by_code' => array(
|
||||
'title' => __( 'Taxes by code', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
'callback' => array( __CLASS__, 'get_report' ),
|
||||
),
|
||||
"taxes_by_date" => array(
|
||||
'taxes_by_date' => array(
|
||||
'title' => __( 'Taxes by date', 'woocommerce' ),
|
||||
'description' => '',
|
||||
'hide_title' => true,
|
||||
|
@ -180,5 +177,3 @@ class WC_Admin_Reports {
|
|||
$report->output_report();
|
||||
}
|
||||
}
|
||||
|
||||
endif;
|
||||
|
|
|
@ -72,7 +72,7 @@ class WC_Report_Downloads extends WP_List_Table {
|
|||
if ( ! empty( $permission ) && ! empty( $product ) ) {
|
||||
// File information.
|
||||
$file = $product->get_file( $permission->get_download_id() );
|
||||
|
||||
|
||||
// Output the titles at the top of the report.
|
||||
$this->output_report_title( $file, $product, $permission );
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ class WC_Report_Downloads extends WP_List_Table {
|
|||
if ( ! empty( $permission ) ) {
|
||||
edit_post_link( '#' . $permission->order_id, '', '', $permission->order_id );
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 'user' :
|
||||
|
@ -176,11 +176,11 @@ class WC_Report_Downloads extends WP_List_Table {
|
|||
public function get_columns() {
|
||||
|
||||
$columns = array(
|
||||
'timestamp' => __( 'Download time', 'woocommerce' ),
|
||||
'timestamp' => __( 'Timestamp', 'woocommerce' ),
|
||||
'product' => __( 'Product', 'woocommerce' ),
|
||||
'order' => __( 'Order', 'woocommerce' ),
|
||||
'user' => __( 'User', 'woocommerce' ),
|
||||
'user_ip_address' => __( 'User IP Address', 'woocommerce' ),
|
||||
'user_ip_address' => __( 'IP Address', 'woocommerce' ),
|
||||
);
|
||||
|
||||
return $columns;
|
||||
|
@ -212,7 +212,7 @@ class WC_Report_Downloads extends WP_List_Table {
|
|||
* No items found text.
|
||||
*/
|
||||
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