Sentence case all the things analytics (https://github.com/woocommerce/woocommerce-admin/pull/6501)
* Sentence case all the things * Update a few more things that were missed on the first round * update documentation titles to use title case * Add changelog * Handle PR feedback * Revert readme changelog changes * Revert changes to ALT text in dev documentation * Revert a change to ALT text in dev documentation * Fix failing tests Co-authored-by: David Levin <davidlevin@Davids-MacBook-Pro-2.local> Co-authored-by: Joshua Flowers <joshuatf@gmail.com> Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
This commit is contained in:
parent
78e49ab09e
commit
c728cced1f
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: Tweak
|
||||
|
||||
Change all analytics strings and labels to sentence case. #6501
|
|
@ -53,7 +53,7 @@ exports[`Leaderboard should render correct data in the table 1`] = `
|
|||
<span
|
||||
aria-hidden="false"
|
||||
>
|
||||
Items Sold
|
||||
Items sold
|
||||
</span>
|
||||
</th>
|
||||
<th
|
||||
|
@ -75,7 +75,7 @@ exports[`Leaderboard should render correct data in the table 1`] = `
|
|||
<span
|
||||
aria-hidden="false"
|
||||
>
|
||||
Net Sales
|
||||
Net sales
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
|
|
|
@ -62,13 +62,13 @@ describe( 'Leaderboard', () => {
|
|||
label: 'Name',
|
||||
},
|
||||
{
|
||||
label: 'Items Sold',
|
||||
label: 'Items sold',
|
||||
},
|
||||
{
|
||||
label: 'Orders',
|
||||
},
|
||||
{
|
||||
label: 'Net Sales',
|
||||
label: 'Net sales',
|
||||
},
|
||||
];
|
||||
const { container } = render(
|
||||
|
|
|
@ -43,7 +43,7 @@ class ReportFilters extends Component {
|
|||
const { report, addCesSurveyForAnalytics } = this.props;
|
||||
|
||||
// This event gets triggered in the following cases.
|
||||
// 1. Select "Single Product" and choose a product.
|
||||
// 1. Select "Single product" and choose a product.
|
||||
// 2. Select "Comparison" or any other filter types.
|
||||
// The comparsion and other filter types require a user to click
|
||||
// a button to execute a query, so this is not a good place to
|
||||
|
|
|
@ -103,8 +103,8 @@ export class ReportSummary extends Component {
|
|||
reverseTrend={ isReverseTrend }
|
||||
prevLabel={
|
||||
compare === 'previous_period'
|
||||
? __( 'Previous Period:', 'woocommerce-admin' )
|
||||
: __( 'Previous Year:', 'woocommerce-admin' )
|
||||
? __( 'Previous period:', 'woocommerce-admin' )
|
||||
: __( 'Previous year:', 'woocommerce-admin' )
|
||||
}
|
||||
prevValue={ prevValue }
|
||||
selected={ isSelected }
|
||||
|
|
|
@ -21,7 +21,7 @@ describe( 'ReportSummary', () => {
|
|||
) {
|
||||
const selectedChart = {
|
||||
key: 'total_sales',
|
||||
label: 'Total Sales',
|
||||
label: 'Total sales',
|
||||
type,
|
||||
};
|
||||
const charts = [ selectedChart ];
|
||||
|
@ -60,11 +60,11 @@ describe( 'ReportSummary', () => {
|
|||
expect( delta ).toBeInTheDocument();
|
||||
|
||||
userEvent.hover( delta );
|
||||
const tooltip = await screen.findByText( 'Previous Year: 500.25' );
|
||||
const tooltip = await screen.findByText( 'Previous year: 500.25' );
|
||||
expect( tooltip ).toBeInTheDocument();
|
||||
|
||||
userEvent.unhover( delta );
|
||||
expect( screen.queryByText( 'Previous Year: 500.25' ) ).toBeNull();
|
||||
expect( screen.queryByText( 'Previous year: 500.25' ) ).toBeNull();
|
||||
} );
|
||||
|
||||
test( 'should format currency numbers properly', async () => {
|
||||
|
@ -76,11 +76,11 @@ describe( 'ReportSummary', () => {
|
|||
expect( delta ).toBeInTheDocument();
|
||||
|
||||
userEvent.hover( delta );
|
||||
const tooltip = await screen.findByText( 'Previous Year: $500.25' );
|
||||
const tooltip = await screen.findByText( 'Previous year: $500.25' );
|
||||
expect( tooltip ).toBeInTheDocument();
|
||||
|
||||
userEvent.unhover( delta );
|
||||
expect( screen.queryByText( 'Previous Year: $500.25' ) ).toBeNull();
|
||||
expect( screen.queryByText( 'Previous year: $500.25' ) ).toBeNull();
|
||||
} );
|
||||
|
||||
test( 'should format average numbers properly', async () => {
|
||||
|
@ -92,11 +92,11 @@ describe( 'ReportSummary', () => {
|
|||
expect( delta ).toBeInTheDocument();
|
||||
|
||||
userEvent.hover( delta );
|
||||
const tooltip = await screen.findByText( 'Previous Year: 500' );
|
||||
const tooltip = await screen.findByText( 'Previous year: 500' );
|
||||
expect( tooltip ).toBeInTheDocument();
|
||||
|
||||
userEvent.unhover( delta );
|
||||
expect( screen.queryByText( 'Previous Year: 500' ) ).toBeNull();
|
||||
expect( screen.queryByText( 'Previous year: 500' ) ).toBeNull();
|
||||
} );
|
||||
|
||||
test( 'should not break if secondary value is 0', async () => {
|
||||
|
@ -108,11 +108,11 @@ describe( 'ReportSummary', () => {
|
|||
expect( delta ).toBeInTheDocument();
|
||||
|
||||
userEvent.hover( delta );
|
||||
const tooltip = await screen.findByText( 'Previous Year: 0' );
|
||||
const tooltip = await screen.findByText( 'Previous year: 0' );
|
||||
expect( tooltip ).toBeInTheDocument();
|
||||
|
||||
userEvent.unhover( delta );
|
||||
expect( screen.queryByText( 'Previous Year: 0' ) ).toBeNull();
|
||||
expect( screen.queryByText( 'Previous year: 0' ) ).toBeNull();
|
||||
} );
|
||||
|
||||
test( 'should show 0s when displaying an empty search', async () => {
|
||||
|
@ -120,7 +120,7 @@ describe( 'ReportSummary', () => {
|
|||
|
||||
expect( screen.getAllByText( 'N/A' ) ).not.toBeNull();
|
||||
|
||||
const delta = screen.getByLabelText( 'No change from Previous Year:' );
|
||||
const delta = screen.getByLabelText( 'No change from Previous year:' );
|
||||
expect( delta ).toBeInTheDocument();
|
||||
} );
|
||||
|
||||
|
|
|
@ -23,14 +23,14 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
|
|||
export const charts = applyFilters( CATEGORY_REPORT_CHARTS_FILTER, [
|
||||
{
|
||||
key: 'items_sold',
|
||||
label: __( 'Items Sold', 'woocommerce-admin' ),
|
||||
label: __( 'Items sold', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'items_sold',
|
||||
type: 'number',
|
||||
},
|
||||
{
|
||||
key: 'net_revenue',
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'net_revenue',
|
||||
type: 'currency',
|
||||
|
@ -49,7 +49,7 @@ export const advancedFilters = applyFilters(
|
|||
{
|
||||
filters: {},
|
||||
title: _x(
|
||||
'Categories Match {{select /}} Filters',
|
||||
'Categories match {{select /}} filters',
|
||||
'A sentence describing filters for Categories. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -58,11 +58,11 @@ export const advancedFilters = applyFilters(
|
|||
|
||||
const filterValues = [
|
||||
{
|
||||
label: __( 'All Categories', 'woocommerce-admin' ),
|
||||
label: __( 'All categories', 'woocommerce-admin' ),
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
label: __( 'Single Category', 'woocommerce-admin' ),
|
||||
label: __( 'Single category', 'woocommerce-admin' ),
|
||||
value: 'select_category',
|
||||
chartMode: 'item-comparison',
|
||||
subFilters: [
|
||||
|
@ -113,7 +113,7 @@ const filterValues = [
|
|||
|
||||
if ( Object.keys( advancedFilters.filters ).length ) {
|
||||
filterValues.push( {
|
||||
label: __( 'Advanced Filters', 'woocommerce-admin' ),
|
||||
label: __( 'Advanced filters', 'woocommerce-admin' ),
|
||||
value: 'advanced',
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class CategoriesReportTable extends Component {
|
|||
isLeftAligned: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Items Sold', 'woocommerce-admin' ),
|
||||
label: __( 'Items sold', 'woocommerce-admin' ),
|
||||
key: 'items_sold',
|
||||
required: true,
|
||||
defaultSort: true,
|
||||
|
@ -44,7 +44,7 @@ class CategoriesReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
key: 'net_revenue',
|
||||
isSortable: true,
|
||||
isNumeric: true,
|
||||
|
@ -140,8 +140,8 @@ class CategoriesReportTable extends Component {
|
|||
return [
|
||||
{
|
||||
label: _n(
|
||||
'category',
|
||||
'categories',
|
||||
'Category',
|
||||
'Categories',
|
||||
totalResults,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -149,21 +149,21 @@ class CategoriesReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
'item sold',
|
||||
'items sold',
|
||||
'Item sold',
|
||||
'Items sold',
|
||||
itemsSold,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
value: formatValue( currency, 'number', itemsSold ),
|
||||
},
|
||||
{
|
||||
label: __( 'net sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
value: formatAmount( netRevenue ),
|
||||
},
|
||||
{
|
||||
label: _n(
|
||||
'order',
|
||||
'orders',
|
||||
'Order',
|
||||
'Orders',
|
||||
ordersCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
|
|
@ -21,7 +21,7 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
|
|||
export const charts = applyFilters( COUPON_REPORT_CHARTS_FILTER, [
|
||||
{
|
||||
key: 'orders_count',
|
||||
label: __( 'Discounted Orders', 'woocommerce-admin' ),
|
||||
label: __( 'Discounted orders', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'orders_count',
|
||||
type: 'number',
|
||||
|
@ -40,7 +40,7 @@ export const advancedFilters = applyFilters(
|
|||
{
|
||||
filters: {},
|
||||
title: _x(
|
||||
'Coupons Match {{select /}} Filters',
|
||||
'Coupons match {{select /}} filters',
|
||||
'A sentence describing filters for Coupons. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -48,9 +48,9 @@ export const advancedFilters = applyFilters(
|
|||
);
|
||||
|
||||
const filterValues = [
|
||||
{ label: __( 'All Coupons', 'woocommerce-admin' ), value: 'all' },
|
||||
{ label: __( 'All coupons', 'woocommerce-admin' ), value: 'all' },
|
||||
{
|
||||
label: __( 'Single Coupon', 'woocommerce-admin' ),
|
||||
label: __( 'Single coupon', 'woocommerce-admin' ),
|
||||
value: 'select_coupon',
|
||||
chartMode: 'item-comparison',
|
||||
subFilters: [
|
||||
|
@ -96,7 +96,7 @@ const filterValues = [
|
|||
|
||||
if ( Object.keys( advancedFilters.filters ).length ) {
|
||||
filterValues.push( {
|
||||
label: __( 'Advanced Filters', 'woocommerce-admin' ),
|
||||
label: __( 'Advanced filters', 'woocommerce-admin' ),
|
||||
value: 'advanced',
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class CouponsReportTable extends Component {
|
|||
getHeadersContent() {
|
||||
return [
|
||||
{
|
||||
label: __( 'Coupon Code', 'woocommerce-admin' ),
|
||||
label: __( 'Coupon code', 'woocommerce-admin' ),
|
||||
key: 'code',
|
||||
required: true,
|
||||
isLeftAligned: true,
|
||||
|
@ -43,7 +43,7 @@ class CouponsReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Amount Discounted', 'woocommerce-admin' ),
|
||||
label: __( 'Amount discounted', 'woocommerce-admin' ),
|
||||
key: 'amount',
|
||||
isSortable: true,
|
||||
isNumeric: true,
|
||||
|
@ -178,8 +178,8 @@ class CouponsReportTable extends Component {
|
|||
return [
|
||||
{
|
||||
label: _n(
|
||||
'coupon',
|
||||
'coupons',
|
||||
'Coupon',
|
||||
'Coupons',
|
||||
couponsCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -187,15 +187,15 @@ class CouponsReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
'order',
|
||||
'orders',
|
||||
'Order',
|
||||
'Orders',
|
||||
ordersCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
value: formatValue( currency, 'number', ordersCount ),
|
||||
},
|
||||
{
|
||||
label: __( 'amount discounted', 'woocommerce-admin' ),
|
||||
label: __( 'Amount discounted', 'woocommerce-admin' ),
|
||||
value: formatAmount( amount ),
|
||||
},
|
||||
];
|
||||
|
|
|
@ -59,7 +59,7 @@ export const filters = applyFilters( CUSTOMERS_REPORT_FILTERS_FILTER, [
|
|||
],
|
||||
},
|
||||
{
|
||||
label: __( 'Advanced Filters', 'woocommerce-admin' ),
|
||||
label: __( 'Advanced filters', 'woocommerce-admin' ),
|
||||
value: 'advanced',
|
||||
},
|
||||
],
|
||||
|
@ -71,7 +71,7 @@ export const advancedFilters = applyFilters(
|
|||
CUSTOMERS_REPORT_ADVANCED_FILTERS_FILTER,
|
||||
{
|
||||
title: _x(
|
||||
'Customers Match {{select /}} Filters',
|
||||
'Customers match {{select /}} filters',
|
||||
'A sentence describing filters for Customers. See screen shot for context: https://cloudup.com/cCsm3GeXJbE',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
|
|
@ -41,13 +41,13 @@ class CustomersReportTable extends Component {
|
|||
hiddenByDefault: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Last Active', 'woocommerce-admin' ),
|
||||
label: __( 'Last active', 'woocommerce-admin' ),
|
||||
key: 'date_last_active',
|
||||
defaultSort: true,
|
||||
isSortable: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Date Registered', 'woocommerce-admin' ),
|
||||
label: __( 'Date registered', 'woocommerce-admin' ),
|
||||
key: 'date_registered',
|
||||
isSortable: true,
|
||||
},
|
||||
|
@ -62,7 +62,7 @@ class CustomersReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Total Spend', 'woocommerce-admin' ),
|
||||
label: __( 'Total spend', 'woocommerce-admin' ),
|
||||
key: 'total_spend',
|
||||
isSortable: true,
|
||||
isNumeric: true,
|
||||
|
@ -70,7 +70,7 @@ class CustomersReportTable extends Component {
|
|||
{
|
||||
label: __( 'AOV', 'woocommerce-admin' ),
|
||||
screenReaderLabel: __(
|
||||
'Average Order Value',
|
||||
'Average order value',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
key: 'avg_order_value',
|
||||
|
@ -94,7 +94,7 @@ class CustomersReportTable extends Component {
|
|||
isSortable: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Postal Code', 'woocommerce-admin' ),
|
||||
label: __( 'Postal code', 'woocommerce-admin' ),
|
||||
key: 'postcode',
|
||||
hiddenByDefault: true,
|
||||
isSortable: true,
|
||||
|
@ -244,19 +244,19 @@ class CustomersReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
'average order',
|
||||
'average orders',
|
||||
'Average order',
|
||||
'Average orders',
|
||||
avgOrdersCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
value: formatValue( currency, 'number', avgOrdersCount ),
|
||||
},
|
||||
{
|
||||
label: __( 'average lifetime spend', 'woocommerce-admin' ),
|
||||
label: __( 'Average lifetime spend', 'woocommerce-admin' ),
|
||||
value: formatAmount( avgTotalSpend ),
|
||||
},
|
||||
{
|
||||
label: __( 'average order value', 'woocommerce-admin' ),
|
||||
label: __( 'Average order value', 'woocommerce-admin' ),
|
||||
value: formatAmount( avgAvgOrderValue ),
|
||||
},
|
||||
];
|
||||
|
|
|
@ -34,9 +34,9 @@ export const filters = applyFilters( DOWLOADS_REPORT_FILTERS_FILTER, [
|
|||
param: 'filter',
|
||||
showFilters: () => true,
|
||||
filters: [
|
||||
{ label: __( 'All Downloads', 'woocommerce-admin' ), value: 'all' },
|
||||
{ label: __( 'All downloads', 'woocommerce-admin' ), value: 'all' },
|
||||
{
|
||||
label: __( 'Advanced Filters', 'woocommerce-admin' ),
|
||||
label: __( 'Advanced filters', 'woocommerce-admin' ),
|
||||
value: 'advanced',
|
||||
},
|
||||
],
|
||||
|
@ -48,7 +48,7 @@ export const advancedFilters = applyFilters(
|
|||
DOWLOADS_REPORT_ADVANCED_FILTERS_FILTER,
|
||||
{
|
||||
title: _x(
|
||||
'Downloads Match {{select /}} Filters',
|
||||
'Downloads match {{select /}} filters',
|
||||
'A sentence describing filters for Downloads. See screen shot for context: https://cloudup.com/ccxhyH2mEDg',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
|
|
@ -39,13 +39,13 @@ class DownloadsReportTable extends Component {
|
|||
isSortable: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Product Title', 'woocommerce-admin' ),
|
||||
label: __( 'Product title', 'woocommerce-admin' ),
|
||||
key: 'product',
|
||||
isSortable: true,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: __( 'File Name', 'woocommerce-admin' ),
|
||||
label: __( 'File name', 'woocommerce-admin' ),
|
||||
key: 'file_name',
|
||||
},
|
||||
{
|
||||
|
@ -170,8 +170,8 @@ class DownloadsReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
'download',
|
||||
'downloads',
|
||||
'Download',
|
||||
'Downloads',
|
||||
downloadCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
|
|
@ -95,7 +95,7 @@ export default compose(
|
|||
|
||||
const report = getReportParam( props );
|
||||
const searchWords = getSearchWords( query );
|
||||
// Single Category view in Categories Report uses the products endpoint, so search must also.
|
||||
// Single category view in Categories Report uses the products endpoint, so search must also.
|
||||
const mappedReport =
|
||||
report === 'categories' && query.filter === 'single_category'
|
||||
? 'products'
|
||||
|
|
|
@ -28,19 +28,19 @@ export const charts = applyFilters( ORDERS_REPORT_CHARTS_FILTER, [
|
|||
},
|
||||
{
|
||||
key: 'net_revenue',
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'net_total',
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'avg_order_value',
|
||||
label: __( 'Average Order Value', 'woocommerce-admin' ),
|
||||
label: __( 'Average order value', 'woocommerce-admin' ),
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'avg_items_per_order',
|
||||
label: __( 'Average Items Per Order', 'woocommerce-admin' ),
|
||||
label: __( 'Average items per order', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'num_items_sold',
|
||||
type: 'average',
|
||||
|
@ -54,9 +54,9 @@ export const filters = applyFilters( ORDERS_REPORT_FILTERS_FILTER, [
|
|||
param: 'filter',
|
||||
showFilters: () => true,
|
||||
filters: [
|
||||
{ label: __( 'All Orders', 'woocommerce-admin' ), value: 'all' },
|
||||
{ label: __( 'All orders', 'woocommerce-admin' ), value: 'all' },
|
||||
{
|
||||
label: __( 'Advanced Filters', 'woocommerce-admin' ),
|
||||
label: __( 'Advanced filters', 'woocommerce-admin' ),
|
||||
value: 'advanced',
|
||||
},
|
||||
],
|
||||
|
@ -68,7 +68,7 @@ export const advancedFilters = applyFilters(
|
|||
ORDERS_REPORT_ADVANCED_FILTERS_FILTER,
|
||||
{
|
||||
title: _x(
|
||||
'Orders Match {{select /}} Filters',
|
||||
'Orders match {{select /}} filters',
|
||||
'A sentence describing filters for Orders. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -213,7 +213,7 @@ export const advancedFilters = applyFilters(
|
|||
),
|
||||
/* translators: A sentence describing a Coupon filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
||||
title: __(
|
||||
'{{title}}Coupon Code{{/title}} {{rule /}} {{filter /}}',
|
||||
'{{title}}Coupon code{{/title}} {{rule /}} {{filter /}}',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
filter: __( 'Select coupon codes', 'woocommerce-admin' ),
|
||||
|
@ -246,7 +246,7 @@ export const advancedFilters = applyFilters(
|
|||
},
|
||||
customer_type: {
|
||||
labels: {
|
||||
add: __( 'Customer Type', 'woocommerce-admin' ),
|
||||
add: __( 'Customer type', 'woocommerce-admin' ),
|
||||
remove: __( 'Remove customer filter', 'woocommerce-admin' ),
|
||||
rule: __(
|
||||
'Select a customer filter match',
|
||||
|
|
|
@ -58,7 +58,7 @@ class OrdersReportTable extends Component {
|
|||
isSortable: false,
|
||||
},
|
||||
{
|
||||
label: __( 'Customer Type', 'woocommerce-admin' ),
|
||||
label: __( 'Customer type', 'woocommerce-admin' ),
|
||||
key: 'customer_type',
|
||||
required: false,
|
||||
isSortable: false,
|
||||
|
@ -71,7 +71,7 @@ class OrdersReportTable extends Component {
|
|||
isSortable: false,
|
||||
},
|
||||
{
|
||||
label: __( 'Items Sold', 'woocommerce-admin' ),
|
||||
label: __( 'Items sold', 'woocommerce-admin' ),
|
||||
key: 'num_items_sold',
|
||||
required: false,
|
||||
isSortable: true,
|
||||
|
@ -85,8 +85,8 @@ class OrdersReportTable extends Component {
|
|||
isSortable: false,
|
||||
},
|
||||
{
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
screenReaderLabel: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
screenReaderLabel: __( 'Net sales', 'woocommerce-admin' ),
|
||||
key: 'net_total',
|
||||
required: true,
|
||||
isSortable: true,
|
||||
|
@ -254,8 +254,8 @@ class OrdersReportTable extends Component {
|
|||
return [
|
||||
{
|
||||
label: _n(
|
||||
'order',
|
||||
'orders',
|
||||
'Order',
|
||||
'Orders',
|
||||
ordersCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -263,8 +263,8 @@ class OrdersReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
' customer',
|
||||
' customers',
|
||||
' Customer',
|
||||
' Customers',
|
||||
totalCustomers,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -272,8 +272,8 @@ class OrdersReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
'product',
|
||||
'products',
|
||||
'Product',
|
||||
'Products',
|
||||
products,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -281,8 +281,8 @@ class OrdersReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
'item sold',
|
||||
'items sold',
|
||||
'Item sold',
|
||||
'Items sold',
|
||||
numItemsSold,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -290,8 +290,8 @@ class OrdersReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
'coupon',
|
||||
'coupons',
|
||||
'Coupon',
|
||||
'Coupons',
|
||||
couponsCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
|
|
@ -26,14 +26,14 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
|
|||
export const charts = applyFilters( PRODUCTS_REPORT_CHARTS_FILTER, [
|
||||
{
|
||||
key: 'items_sold',
|
||||
label: __( 'Items Sold', 'woocommerce-admin' ),
|
||||
label: __( 'Items sold', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'items_sold',
|
||||
type: 'number',
|
||||
},
|
||||
{
|
||||
key: 'net_revenue',
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'net_revenue',
|
||||
type: 'currency',
|
||||
|
@ -53,9 +53,9 @@ const filterConfig = {
|
|||
param: 'filter',
|
||||
showFilters: () => true,
|
||||
filters: [
|
||||
{ label: __( 'All Products', 'woocommerce-admin' ), value: 'all' },
|
||||
{ label: __( 'All products', 'woocommerce-admin' ), value: 'all' },
|
||||
{
|
||||
label: __( 'Single Product', 'woocommerce-admin' ),
|
||||
label: __( 'Single product', 'woocommerce-admin' ),
|
||||
value: 'select_product',
|
||||
chartMode: 'item-comparison',
|
||||
subFilters: [
|
||||
|
@ -73,7 +73,7 @@ const filterConfig = {
|
|||
'Type to search for a product',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
button: __( 'Single Product', 'woocommerce-admin' ),
|
||||
button: __( 'Single product', 'woocommerce-admin' ),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -114,12 +114,12 @@ const variationsConfig = {
|
|||
param: 'filter-variations',
|
||||
filters: [
|
||||
{
|
||||
label: __( 'All Variations', 'woocommerce-admin' ),
|
||||
label: __( 'All variations', 'woocommerce-admin' ),
|
||||
chartMode: 'item-comparison',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
label: __( 'Single Variation', 'woocommerce-admin' ),
|
||||
label: __( 'Single variation', 'woocommerce-admin' ),
|
||||
value: 'select_variation',
|
||||
subFilters: [
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ const variationsConfig = {
|
|||
'woocommerce-admin'
|
||||
),
|
||||
button: __(
|
||||
'Single Variation',
|
||||
'Single variation',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
},
|
||||
|
|
|
@ -37,7 +37,7 @@ class ProductsReportTable extends Component {
|
|||
getHeadersContent() {
|
||||
return [
|
||||
{
|
||||
label: __( 'Product Title', 'woocommerce-admin' ),
|
||||
label: __( 'Product title', 'woocommerce-admin' ),
|
||||
key: 'product_name',
|
||||
required: true,
|
||||
isLeftAligned: true,
|
||||
|
@ -50,7 +50,7 @@ class ProductsReportTable extends Component {
|
|||
isSortable: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Items Sold', 'woocommerce-admin' ),
|
||||
label: __( 'Items sold', 'woocommerce-admin' ),
|
||||
key: 'items_sold',
|
||||
required: true,
|
||||
defaultSort: true,
|
||||
|
@ -58,8 +58,8 @@ class ProductsReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
screenReaderLabel: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
screenReaderLabel: __( 'Net sales', 'woocommerce-admin' ),
|
||||
key: 'net_revenue',
|
||||
required: true,
|
||||
isSortable: true,
|
||||
|
@ -284,8 +284,8 @@ class ProductsReportTable extends Component {
|
|||
return [
|
||||
{
|
||||
label: _n(
|
||||
'product',
|
||||
'products',
|
||||
'Product',
|
||||
'Products',
|
||||
productsCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -293,21 +293,21 @@ class ProductsReportTable extends Component {
|
|||
},
|
||||
{
|
||||
label: _n(
|
||||
'item sold',
|
||||
'items sold',
|
||||
'Item sold',
|
||||
'Items sold',
|
||||
itemsSold,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
value: formatValue( currency, 'number', itemsSold ),
|
||||
},
|
||||
{
|
||||
label: __( 'net sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
value: formatAmount( netRevenue ),
|
||||
},
|
||||
{
|
||||
label: _n(
|
||||
'orders',
|
||||
'orders',
|
||||
'Orders',
|
||||
'Orders',
|
||||
ordersCount,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
|
|
@ -13,7 +13,7 @@ const REVENUE_REPORT_ADVANCED_FILTERS_FILTER =
|
|||
export const charts = applyFilters( REVENUE_REPORT_CHARTS_FILTER, [
|
||||
{
|
||||
key: 'gross_sales',
|
||||
label: __( 'Gross Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Gross sales', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'gross_sales',
|
||||
type: 'currency',
|
||||
|
@ -37,7 +37,7 @@ export const charts = applyFilters( REVENUE_REPORT_CHARTS_FILTER, [
|
|||
},
|
||||
{
|
||||
key: 'net_revenue',
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
orderby: 'net_revenue',
|
||||
type: 'currency',
|
||||
isReverseTrend: false,
|
||||
|
@ -59,7 +59,7 @@ export const charts = applyFilters( REVENUE_REPORT_CHARTS_FILTER, [
|
|||
},
|
||||
{
|
||||
key: 'total_sales',
|
||||
label: __( 'Total Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Total sales', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'total_sales',
|
||||
type: 'currency',
|
||||
|
|
|
@ -69,7 +69,7 @@ class RevenueReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Gross Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Gross sales', 'woocommerce-admin' ),
|
||||
key: 'gross_sales',
|
||||
required: false,
|
||||
isSortable: true,
|
||||
|
@ -90,7 +90,7 @@ class RevenueReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
key: 'net_revenue',
|
||||
required: false,
|
||||
isSortable: true,
|
||||
|
@ -111,7 +111,7 @@ class RevenueReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Total Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Total sales', 'woocommerce-admin' ),
|
||||
key: 'total_sales',
|
||||
required: false,
|
||||
isSortable: true,
|
||||
|
@ -232,31 +232,31 @@ class RevenueReportTable extends Component {
|
|||
value: formatValue( currency, 'number', ordersCount ),
|
||||
},
|
||||
{
|
||||
label: __( 'gross sales', 'woocommerce-admin' ),
|
||||
label: __( 'Gross sales', 'woocommerce-admin' ),
|
||||
value: formatAmount( grossSales ),
|
||||
},
|
||||
{
|
||||
label: __( 'returns', 'woocommerce-admin' ),
|
||||
label: __( 'Returns', 'woocommerce-admin' ),
|
||||
value: formatAmount( refunds ),
|
||||
},
|
||||
{
|
||||
label: __( 'coupons', 'woocommerce-admin' ),
|
||||
label: __( 'Coupons', 'woocommerce-admin' ),
|
||||
value: formatAmount( coupons ),
|
||||
},
|
||||
{
|
||||
label: __( 'net sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
value: formatAmount( netRevenue ),
|
||||
},
|
||||
{
|
||||
label: __( 'taxes', 'woocommerce-admin' ),
|
||||
label: __( 'Taxes', 'woocommerce-admin' ),
|
||||
value: formatAmount( taxes ),
|
||||
},
|
||||
{
|
||||
label: __( 'shipping', 'woocommerce-admin' ),
|
||||
label: __( 'Shipping', 'woocommerce-admin' ),
|
||||
value: formatAmount( shipping ),
|
||||
},
|
||||
{
|
||||
label: __( 'total sales', 'woocommerce-admin' ),
|
||||
label: __( 'Total sales', 'woocommerce-admin' ),
|
||||
value: formatAmount( totalSales ),
|
||||
},
|
||||
];
|
||||
|
|
|
@ -29,18 +29,18 @@ export const filters = applyFilters( STOCK_REPORT_FILTERS_FILTER, [
|
|||
param: 'type',
|
||||
showFilters: () => true,
|
||||
filters: [
|
||||
{ label: __( 'All Products', 'woocommerce-admin' ), value: 'all' },
|
||||
{ label: __( 'All products', 'woocommerce-admin' ), value: 'all' },
|
||||
{
|
||||
label: __( 'Out of Stock', 'woocommerce-admin' ),
|
||||
label: __( 'Out of stock', 'woocommerce-admin' ),
|
||||
value: 'outofstock',
|
||||
},
|
||||
{
|
||||
label: __( 'Low Stock', 'woocommerce-admin' ),
|
||||
label: __( 'Low stock', 'woocommerce-admin' ),
|
||||
value: 'lowstock',
|
||||
},
|
||||
{ label: __( 'In Stock', 'woocommerce-admin' ), value: 'instock' },
|
||||
{ label: __( 'In stock', 'woocommerce-admin' ), value: 'instock' },
|
||||
{
|
||||
label: __( 'On Backorder', 'woocommerce-admin' ),
|
||||
label: __( 'On backorder', 'woocommerce-admin' ),
|
||||
value: 'onbackorder',
|
||||
},
|
||||
],
|
||||
|
|
|
@ -147,27 +147,27 @@ class StockReportTable extends Component {
|
|||
return [
|
||||
{
|
||||
label: _n(
|
||||
'product',
|
||||
'products',
|
||||
'Product',
|
||||
'Products',
|
||||
products,
|
||||
'woocommerce-admin'
|
||||
),
|
||||
value: formatValue( currency, 'number', products ),
|
||||
},
|
||||
{
|
||||
label: __( 'out of stock', 'woocommerce-admin' ),
|
||||
label: __( 'Out of stock', 'woocommerce-admin' ),
|
||||
value: formatValue( currency, 'number', outofstock ),
|
||||
},
|
||||
{
|
||||
label: __( 'low stock', 'woocommerce-admin' ),
|
||||
label: __( 'Low stock', 'woocommerce-admin' ),
|
||||
value: formatValue( currency, 'number', lowstock ),
|
||||
},
|
||||
{
|
||||
label: __( 'on backorder', 'woocommerce-admin' ),
|
||||
label: __( 'On backorder', 'woocommerce-admin' ),
|
||||
value: formatValue( currency, 'number', onbackorder ),
|
||||
},
|
||||
{
|
||||
label: __( 'in stock', 'woocommerce-admin' ),
|
||||
label: __( 'In stock', 'woocommerce-admin' ),
|
||||
value: formatValue( currency, 'number', instock ),
|
||||
},
|
||||
];
|
||||
|
|
|
@ -23,21 +23,21 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
|
|||
export const charts = applyFilters( TAXES_REPORT_CHARTS_FILTER, [
|
||||
{
|
||||
key: 'total_tax',
|
||||
label: __( 'Total Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Total tax', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'total_tax',
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'order_tax',
|
||||
label: __( 'Order Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Order tax', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'order_tax',
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'shipping_tax',
|
||||
label: __( 'Shipping Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Shipping tax', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'shipping_tax',
|
||||
type: 'currency',
|
||||
|
@ -56,7 +56,7 @@ export const advancedFilters = applyFilters(
|
|||
{
|
||||
filters: {},
|
||||
title: _x(
|
||||
'Taxes Match {{select /}} Filters',
|
||||
'Taxes match {{select /}} filters',
|
||||
'A sentence describing filters for Taxes. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
@ -64,7 +64,7 @@ export const advancedFilters = applyFilters(
|
|||
);
|
||||
|
||||
const filterValues = [
|
||||
{ label: __( 'All Taxes', 'woocommerce-admin' ), value: 'all' },
|
||||
{ label: __( 'All taxes', 'woocommerce-admin' ), value: 'all' },
|
||||
{
|
||||
label: __( 'Comparison', 'woocommerce-admin' ),
|
||||
value: 'compare-taxes',
|
||||
|
@ -99,7 +99,7 @@ const filterValues = [
|
|||
|
||||
if ( Object.keys( advancedFilters.filters ).length ) {
|
||||
filterValues.push( {
|
||||
label: __( 'Advanced Filters', 'woocommerce-admin' ),
|
||||
label: __( 'Advanced filters', 'woocommerce-admin' ),
|
||||
value: 'advanced',
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class TaxesReportTable extends Component {
|
|||
getHeadersContent() {
|
||||
return [
|
||||
{
|
||||
label: __( 'Tax Code', 'woocommerce-admin' ),
|
||||
label: __( 'Tax code', 'woocommerce-admin' ),
|
||||
key: 'tax_code',
|
||||
required: true,
|
||||
isLeftAligned: true,
|
||||
|
@ -40,17 +40,17 @@ class TaxesReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Total Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Total tax', 'woocommerce-admin' ),
|
||||
key: 'total_tax',
|
||||
isSortable: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Order Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Order tax', 'woocommerce-admin' ),
|
||||
key: 'order_tax',
|
||||
isSortable: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Shipping Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Shipping tax', 'woocommerce-admin' ),
|
||||
key: 'shipping_tax',
|
||||
isSortable: true,
|
||||
},
|
||||
|
|
|
@ -27,14 +27,14 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
|
|||
export const charts = applyFilters( VARIATIONS_REPORT_CHARTS_FILTER, [
|
||||
{
|
||||
key: 'items_sold',
|
||||
label: __( 'Items Sold', 'woocommerce-admin' ),
|
||||
label: __( 'Items sold', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'items_sold',
|
||||
type: 'number',
|
||||
},
|
||||
{
|
||||
key: 'net_revenue',
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
order: 'desc',
|
||||
orderby: 'net_revenue',
|
||||
type: 'currency',
|
||||
|
@ -56,12 +56,12 @@ export const filters = applyFilters( VARIATIONS_REPORT_FILTERS_FILTER, [
|
|||
showFilters: () => true,
|
||||
filters: [
|
||||
{
|
||||
label: __( 'All Variations', 'woocommerce-admin' ),
|
||||
label: __( 'All variations', 'woocommerce-admin' ),
|
||||
chartMode: 'item-comparison',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
label: __( 'Single Variation', 'woocommerce-admin' ),
|
||||
label: __( 'Single variation', 'woocommerce-admin' ),
|
||||
value: 'select_variation',
|
||||
subFilters: [
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ export const filters = applyFilters( VARIATIONS_REPORT_FILTERS_FILTER, [
|
|||
'woocommerce-admin'
|
||||
),
|
||||
button: __(
|
||||
'Single Variation',
|
||||
'Single variation',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
},
|
||||
|
@ -110,7 +110,7 @@ export const filters = applyFilters( VARIATIONS_REPORT_FILTERS_FILTER, [
|
|||
},
|
||||
},
|
||||
{
|
||||
label: __( 'Advanced Filters', 'woocommerce-admin' ),
|
||||
label: __( 'Advanced filters', 'woocommerce-admin' ),
|
||||
value: 'advanced',
|
||||
},
|
||||
],
|
||||
|
@ -121,7 +121,7 @@ export const advancedFilters = applyFilters(
|
|||
VARIATIONS_REPORT_ADVANCED_FILTERS_FILTER,
|
||||
{
|
||||
title: _x(
|
||||
'Variations Match {{select /}} Filters',
|
||||
'Variations match {{select /}} filters',
|
||||
'A sentence describing filters for Variations. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
|
|
|
@ -35,7 +35,7 @@ class VariationsReportTable extends Component {
|
|||
getHeadersContent() {
|
||||
return [
|
||||
{
|
||||
label: __( 'Product / Variation Title', 'woocommerce-admin' ),
|
||||
label: __( 'Product / Variation title', 'woocommerce-admin' ),
|
||||
key: 'name',
|
||||
required: true,
|
||||
isLeftAligned: true,
|
||||
|
@ -47,7 +47,7 @@ class VariationsReportTable extends Component {
|
|||
isSortable: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Items Sold', 'woocommerce-admin' ),
|
||||
label: __( 'Items sold', 'woocommerce-admin' ),
|
||||
key: 'items_sold',
|
||||
required: true,
|
||||
defaultSort: true,
|
||||
|
@ -55,8 +55,8 @@ class VariationsReportTable extends Component {
|
|||
isNumeric: true,
|
||||
},
|
||||
{
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
screenReaderLabel: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
screenReaderLabel: __( 'Net sales', 'woocommerce-admin' ),
|
||||
key: 'net_revenue',
|
||||
required: true,
|
||||
isSortable: true,
|
||||
|
|
|
@ -74,7 +74,7 @@ const orderStatusOptions = [
|
|||
|
||||
export const config = applyFilters( SETTINGS_FILTER, {
|
||||
woocommerce_excluded_report_order_statuses: {
|
||||
label: __( 'Excluded Statuses:', 'woocommerce-admin' ),
|
||||
label: __( 'Excluded statuses:', 'woocommerce-admin' ),
|
||||
inputType: 'checkboxGroup',
|
||||
options: orderStatusOptions,
|
||||
helpText: interpolateComponents( {
|
||||
|
@ -90,7 +90,7 @@ export const config = applyFilters( SETTINGS_FILTER, {
|
|||
defaultValue: [ 'pending', 'cancelled', 'failed' ],
|
||||
},
|
||||
woocommerce_actionable_order_statuses: {
|
||||
label: __( 'Actionable Statuses:', 'woocommerce-admin' ),
|
||||
label: __( 'Actionable statuses:', 'woocommerce-admin' ),
|
||||
inputType: 'checkboxGroup',
|
||||
options: orderStatusOptions,
|
||||
helpText: __(
|
||||
|
@ -102,7 +102,7 @@ export const config = applyFilters( SETTINGS_FILTER, {
|
|||
},
|
||||
woocommerce_default_date_range: {
|
||||
name: 'woocommerce_default_date_range',
|
||||
label: __( 'Default Date Range:', 'woocommerce-admin' ),
|
||||
label: __( 'Default date range:', 'woocommerce-admin' ),
|
||||
inputType: 'component',
|
||||
component: DefaultDate,
|
||||
helpText: __(
|
||||
|
|
|
@ -42,7 +42,7 @@ class HistoricalDataLayout extends Component {
|
|||
<Fragment>
|
||||
<SectionHeader
|
||||
title={ __(
|
||||
'Import Historical Data',
|
||||
'Import historical data',
|
||||
'woocommerce-admin'
|
||||
) }
|
||||
/>
|
||||
|
|
|
@ -66,7 +66,7 @@ function HistoricalDataPeriodSelector( {
|
|||
<div className="woocommerce-settings-historical-data__column">
|
||||
<SelectControl
|
||||
label={ __(
|
||||
'Import Historical Data',
|
||||
'Import historical data',
|
||||
'woocommerce-admin'
|
||||
) }
|
||||
value={ value.label }
|
||||
|
|
|
@ -130,7 +130,7 @@ const Settings = ( { createNotice, query } ) => {
|
|||
return (
|
||||
<Fragment>
|
||||
<SectionHeader
|
||||
title={ __( 'Analytics Settings', 'woocommerce-admin' ) }
|
||||
title={ __( 'Analytics settings', 'woocommerce-admin' ) }
|
||||
/>
|
||||
<div className="woocommerce-settings__wrapper">
|
||||
{ Object.keys( config ).map( ( setting ) => (
|
||||
|
@ -144,14 +144,14 @@ const Settings = ( { createNotice, query } ) => {
|
|||
) ) }
|
||||
<div className="woocommerce-settings__actions">
|
||||
<Button isSecondary onClick={ resetDefaults }>
|
||||
{ __( 'Reset Defaults', 'woocommerce-admin' ) }
|
||||
{ __( 'Reset defaults', 'woocommerce-admin' ) }
|
||||
</Button>
|
||||
<Button
|
||||
isPrimary
|
||||
isBusy={ isRequesting }
|
||||
onClick={ saveChanges }
|
||||
>
|
||||
{ __( 'Save Settings', 'woocommerce-admin' ) }
|
||||
{ __( 'Save settings', 'woocommerce-admin' ) }
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -27,12 +27,12 @@ const charts = {
|
|||
|
||||
const defaultCharts = [
|
||||
{
|
||||
label: __( 'Total Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Total sales', 'woocommerce-admin' ),
|
||||
report: 'revenue',
|
||||
key: 'total_sales',
|
||||
},
|
||||
{
|
||||
label: __( 'Net Sales', 'woocommerce-admin' ),
|
||||
label: __( 'Net sales', 'woocommerce-admin' ),
|
||||
report: 'revenue',
|
||||
key: 'net_revenue',
|
||||
},
|
||||
|
@ -42,12 +42,12 @@ const defaultCharts = [
|
|||
key: 'orders_count',
|
||||
},
|
||||
{
|
||||
label: __( 'Average Order Value', 'woocommerce-admin' ),
|
||||
label: __( 'Average order value', 'woocommerce-admin' ),
|
||||
report: 'orders',
|
||||
key: 'avg_order_value',
|
||||
},
|
||||
{
|
||||
label: __( 'Items Sold', 'woocommerce-admin' ),
|
||||
label: __( 'Items sold', 'woocommerce-admin' ),
|
||||
report: 'products',
|
||||
key: 'items_sold',
|
||||
},
|
||||
|
@ -57,7 +57,7 @@ const defaultCharts = [
|
|||
key: 'refunds',
|
||||
},
|
||||
{
|
||||
label: __( 'Discounted Orders', 'woocommerce-admin' ),
|
||||
label: __( 'Discounted orders', 'woocommerce-admin' ),
|
||||
report: 'coupons',
|
||||
key: 'orders_count',
|
||||
},
|
||||
|
@ -67,17 +67,17 @@ const defaultCharts = [
|
|||
key: 'amount',
|
||||
},
|
||||
{
|
||||
label: __( 'Total Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Total tax', 'woocommerce-admin' ),
|
||||
report: 'taxes',
|
||||
key: 'total_tax',
|
||||
},
|
||||
{
|
||||
label: __( 'Order Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Order tax', 'woocommerce-admin' ),
|
||||
report: 'taxes',
|
||||
key: 'order_tax',
|
||||
},
|
||||
{
|
||||
label: __( 'Shipping Tax', 'woocommerce-admin' ),
|
||||
label: __( 'Shipping tax', 'woocommerce-admin' ),
|
||||
report: 'taxes',
|
||||
key: 'shipping_tax',
|
||||
},
|
||||
|
|
|
@ -124,7 +124,7 @@ const Leaderboards = ( props ) => {
|
|||
} ) }
|
||||
<SelectControl
|
||||
className="woocommerce-dashboard__dashboard-leaderboards__select"
|
||||
label={ __( 'Rows Per Table', 'woocommerce-admin' ) }
|
||||
label={ __( 'Rows per table', 'woocommerce-admin' ) }
|
||||
value={ rowsPerTable }
|
||||
options={ Array.from( { length: 20 }, ( v, key ) => ( {
|
||||
v: key + 1,
|
||||
|
|
|
@ -44,7 +44,7 @@ class SectionControls extends Component {
|
|||
<Fragment>
|
||||
<div className="woocommerce-ellipsis-menu__item">
|
||||
<TextControl
|
||||
label={ __( 'Section Title', 'woocommerce-admin' ) }
|
||||
label={ __( 'Section title', 'woocommerce-admin' ) }
|
||||
onBlur={ onTitleBlur }
|
||||
onChange={ onTitleChange }
|
||||
required
|
||||
|
|
|
@ -55,7 +55,7 @@ class StorePerformance extends Component {
|
|||
renderContent={ ( { onToggle } ) => (
|
||||
<Fragment>
|
||||
<MenuTitle>
|
||||
{ __( 'Display Stats:', 'woocommerce-admin' ) }
|
||||
{ __( 'Display stats:', 'woocommerce-admin' ) }
|
||||
</MenuTitle>
|
||||
{ indicators.map( ( indicator, i ) => {
|
||||
const checked = ! hiddenBlocks.includes(
|
||||
|
@ -124,8 +124,8 @@ class StorePerformance extends Component {
|
|||
const { compare } = getDateParamsFromQuery( query, defaultDateRange );
|
||||
const prevLabel =
|
||||
compare === 'previous_period'
|
||||
? __( 'Previous Period:', 'woocommerce-admin' )
|
||||
: __( 'Previous Year:', 'woocommerce-admin' );
|
||||
? __( 'Previous period:', 'woocommerce-admin' )
|
||||
: __( 'Previous year:', 'woocommerce-admin' );
|
||||
const { formatAmount, getCurrencyConfig } = this.context;
|
||||
const currency = getCurrencyConfig();
|
||||
return (
|
||||
|
|
|
@ -73,7 +73,7 @@ export const StatsList = ( {
|
|||
label={ item.label }
|
||||
value={ primaryValue }
|
||||
prevLabel={ __(
|
||||
'Previous Period:',
|
||||
'Previous period:',
|
||||
'woocommerce-admin'
|
||||
) }
|
||||
prevValue={ secondaryValue }
|
||||
|
|
|
@ -62,7 +62,7 @@ describe( 'StatsOverview tracking', () => {
|
|||
} );
|
||||
fireEvent.click( ellipsisBtn );
|
||||
const totalSalesBtn = screen.getByRole( 'menuitemcheckbox', {
|
||||
name: 'Total Sales',
|
||||
name: 'Total sales',
|
||||
} );
|
||||
fireEvent.click( totalSalesBtn );
|
||||
|
||||
|
@ -111,7 +111,7 @@ describe( 'StatsOverview toggle and persist stat preference', () => {
|
|||
} );
|
||||
fireEvent.click( ellipsisBtn );
|
||||
const totalSalesBtn = screen.getByRole( 'menuitemcheckbox', {
|
||||
name: 'Total Sales',
|
||||
name: 'Total sales',
|
||||
} );
|
||||
fireEvent.click( totalSalesBtn );
|
||||
|
||||
|
@ -173,7 +173,7 @@ describe( 'StatsOverview period selection', () => {
|
|||
stats: [
|
||||
{
|
||||
chart: 'total_sales',
|
||||
label: 'Total Sales',
|
||||
label: 'Total sales',
|
||||
stat: 'revenue/total_sales',
|
||||
},
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ import { StatsList } from '../stats-list';
|
|||
jest.mock( '@woocommerce/tracks' );
|
||||
|
||||
const stats = [
|
||||
{ stat: 'revenue/net_revenue', label: 'Net Sales' },
|
||||
{ stat: 'revenue/net_revenue', label: 'Net sales' },
|
||||
{ stat: 'orders/orders_count', label: 'Orders' },
|
||||
];
|
||||
|
||||
|
@ -21,7 +21,7 @@ const data = {
|
|||
{
|
||||
stat: 'revenue/net_revenue',
|
||||
chart: 'net_revenue',
|
||||
label: 'Net Sales',
|
||||
label: 'Net sales',
|
||||
format: 'currency',
|
||||
value: 100,
|
||||
_links: {
|
||||
|
@ -68,7 +68,7 @@ describe( 'StatsList', () => {
|
|||
);
|
||||
|
||||
// Check that there should be two.
|
||||
expect( screen.getByText( 'Net Sales' ) ).toBeDefined();
|
||||
expect( screen.getByText( 'Net sales' ) ).toBeDefined();
|
||||
expect( screen.getByText( 'Orders' ) ).toBeDefined();
|
||||
} );
|
||||
|
||||
|
@ -94,7 +94,7 @@ describe( 'StatsList', () => {
|
|||
/>
|
||||
);
|
||||
|
||||
fireEvent.click( screen.getByText( 'Net Sales' ) );
|
||||
fireEvent.click( screen.getByText( 'Net sales' ) );
|
||||
|
||||
expect( recordEvent ).toHaveBeenCalledWith(
|
||||
'statsoverview_indicators_click',
|
||||
|
|
|
@ -29,5 +29,5 @@ Each report is quite unique with its own set of filtering options and chart type
|
|||
|
||||
The Analytics section also has a menu item for _Settings_. On this page you can control items that affect how the WooCommerce Admin Analytics system works, and you can also import historical data into the reporting database tables.
|
||||
|
||||
- [Analytics Settings](analytics-settings.md)
|
||||
- [Analytics settings](analytics-settings.md)
|
||||
- [Historical Data Import](analytics-historical-data-import.md)
|
||||
|
|
|
@ -40,7 +40,7 @@ For stores with Stock Management enabled, the Stock panel will be displayed.
|
|||
|
||||
![Stock Activity Panel](images/activity-panels-stock.png)
|
||||
|
||||
The Stock Panel will show Products that are either Low in Stock or Out of Stock.
|
||||
The Stock Panel will show Products that are either Low in Stock or Out of stock.
|
||||
|
||||
"Low in Stock" status is determined by a combination of the store setting and individual product settings. Consult the [Managing Products](https://docs.woocommerce.com/document/managing-products/#inventory-tab) documentation to learn more about managing product stock settings.
|
||||
|
||||
|
@ -48,7 +48,7 @@ The Stock Panel will show Products that are either Low in Stock or Out of Stock.
|
|||
|
||||
You can manage Product quantity directly from the Stock Panel.
|
||||
|
||||
![No Low or Out of Stock Products](images/activity-panels-stock-empty.png)
|
||||
![No Low or Out of stock Products](images/activity-panels-stock-empty.png)
|
||||
|
||||
If no Products require attention, the panel will reflect that state.
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ The Date Range picker allows you to specify which dates you want to include in t
|
|||
|
||||
- Today
|
||||
- Yesterday
|
||||
- Week to Date
|
||||
- Last Week
|
||||
- Month to Date
|
||||
- Last Month
|
||||
- Quarter to Date
|
||||
- Last Year
|
||||
- Week to date
|
||||
- Last week
|
||||
- Month to date
|
||||
- Last month
|
||||
- Quarter to date
|
||||
- Last year
|
||||
|
||||
You can also select which date range to compare against, either the same range from the _Prior Year_ or the _Prior Period_.
|
||||
|
||||
|
@ -27,7 +27,7 @@ On the custom picker, you can either manually enter the start and end date using
|
|||
After either choosing a preset, or a custom date range, click the _Update_ button to modify the data in the report. Note by doing this, the date range selected is added to the address of the report URL - which allows you to bookmark, or share a report url with a specific date range to other Store admins. This date selection is persisted on the report view until you navigate away from the report.
|
||||
|
||||
## Advanced Filters
|
||||
Depending on the report you are viewing, their might also be other Quick Filters and/or Advanced Filters that allow you to further customize the data set being viewed.
|
||||
Depending on the report you are viewing, their might also be other Quick Filters and/or Advanced filters that allow you to further customize the data set being viewed.
|
||||
|
||||
![Analytics Filters](analytics-basics-advanced-filters.png)
|
||||
|
||||
|
@ -74,7 +74,7 @@ Many columns in reports will allow you to click on the column header to sort the
|
|||
|
||||
If a report contains a data column that you don't need to be displayed, you can adjust the visiblity of it by using the visibility menu on the right side of the table header. Click the column name in the menu to change the visibility of the column. Your visibility selections are persisted to your user preferences for each report, so on subsequent visits to that report, the columns you have previously toggled off will not be displayed.
|
||||
|
||||
### csv Download
|
||||
### CSV Download
|
||||
![Analytics Table csv Download](analytics-table-download-button.png)
|
||||
|
||||
If you would like to download a copy of the data contained in the report table, you can do so by clicking the _Download_ button in the table header. If the amount of data shown in the report is limited to one page ( e.g. there is no pagination options shown in the table footer ), the csv file will download immediately.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
The Categories Report provides insight about the product categories of your store.
|
||||
|
||||
By default, the Categories report is sorted by number of `Items Sold` by category descending.
|
||||
By default, the Categories report is sorted by number of `Items sold` by category descending.
|
||||
|
||||
![Category Filter](images/analytics-categories-report.png)
|
||||
|
||||
|
@ -48,8 +48,8 @@ At the top of the report table is the search box. This allows you to filter the
|
|||
The report table allows sorting by all columns:
|
||||
|
||||
- Category
|
||||
- Items Sold
|
||||
- Net Sales
|
||||
- Items sold
|
||||
- Net sales
|
||||
- Products (# of unique products sold)
|
||||
- Orders (# of orders containing a product in that category)
|
||||
|
||||
|
@ -60,11 +60,11 @@ Two of the Categories report columns contain clickable entries:
|
|||
- `Category`
|
||||
- `Products`
|
||||
|
||||
Both links opens the Single Category report listing the products sold within that category.
|
||||
Both links opens the Single category report listing the products sold within that category.
|
||||
|
||||
Three of the Single Category report columns contain clickable entries:
|
||||
Three of the Single category report columns contain clickable entries:
|
||||
|
||||
- `Product` link opens the Products report for that product
|
||||
- `Orders` link opens the Orders report for that product
|
||||
- `Category` link opens the Single Category report for that category
|
||||
- `Category` link opens the Single category report for that category
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ At the top of the report table is the search box. This allows you to filter the
|
|||
|
||||
The report table allows sorting by the following columns:
|
||||
|
||||
- Coupon Code
|
||||
- Coupon code
|
||||
- Orders (Number of orders)
|
||||
- Amount Dsicounted
|
||||
|
||||
|
@ -42,5 +42,5 @@ The report table allows sorting by the following columns:
|
|||
|
||||
Two of the report columns contain clickable entries:
|
||||
|
||||
- `Coupon Code` link opens the Coupons report for that coupon code
|
||||
- `Coupon code` link opens the Coupons report for that coupon code
|
||||
- `Orders` link opens the [Orders Report](analytics-orders-report.md) filtered to orders which used that coupon
|
|
@ -22,7 +22,7 @@ There are several filters available to the Customers Report:
|
|||
- Email
|
||||
- Orders (count)
|
||||
- Total Spend
|
||||
- AOV (Average Order Value)
|
||||
- AOV (Average order value)
|
||||
- Registered
|
||||
- Last Active
|
||||
|
||||
|
|
|
@ -14,43 +14,43 @@ If you removed a dashboard section, or you have an extension installed that adds
|
|||
## Performance Indicator Section
|
||||
By default the Performance Indicators section is what appears at the top of your dashboard below the Date Picker. Each performance indicator will display a label informing you of the statistic that is being presented, the value of that statistic for the date range selected, a percentage change over the prior period along with a trend arrow of up/down/same, and the value for the previous period that is being compared.
|
||||
|
||||
Beyond giving you a quick glimpse into the statistic, Peroformance Indicators also act as a quick shortcut to dive deeper into the data behind the stat. For example, clicking on the Total Sales indicator will open up the Revenue Report for the date range that has been selected on the Dashboard. From there you can view associated charts, and tabular data for deeper analysis.
|
||||
Beyond giving you a quick glimpse into the statistic, Peroformance Indicators also act as a quick shortcut to dive deeper into the data behind the stat. For example, clicking on the Total sales indicator will open up the Revenue Report for the date range that has been selected on the Dashboard. From there you can view associated charts, and tabular data for deeper analysis.
|
||||
|
||||
Using the customization menu in the top right corner of the section, you can toggle the display of the following default performance indicators:
|
||||
|
||||
| Indicator Name | Description | Links To ( Report Name > Chart Name ) |
|
||||
|---|---|---|
|
||||
| Total Sales | Gross Sales - Returns - Coupons + Taxes + Shipping | Revenue Report > Total Sales |
|
||||
| Net Sales | Gross Sales - Returns - Coupons | Revenue Report > Net Sales |
|
||||
| Total sales | Gross sales - Returns - Coupons + Taxes + Shipping | Revenue Report > Total sales |
|
||||
| Net sales | Gross sales - Returns - Coupons | Revenue Report > Net sales |
|
||||
| Orders | The number of new orders placed for a selected date range | Orders Report > Orders |
|
||||
| Average Order Value | Net Sales / Orders | Orders Report > Average Order Value |
|
||||
| Items Sold | The discrete number of items sold. | Products Report > Items Sold |
|
||||
| Average order value | Net sales / Orders | Orders Report > Average order value |
|
||||
| Items sold | The discrete number of items sold. | Products Report > Items sold |
|
||||
| Refunds | Money returned to the customer via a refund | Revenue Report > Refunds |
|
||||
| Discounted Orders | The count of orders with a coupon applied. | Coupons Report > Orders Count |
|
||||
| Net Discount Amount | Total sum of discounts from coupons. | Coupons Report > Amount |
|
||||
| Total Tax | Order Tax + Shipping Tax | Taxes Report > Total Tax |
|
||||
| Order Tax | The total of tax applied to items in an order | Taxes Report > Order Tax |
|
||||
| Shipping Tax | The total of tax applied to shipping in an order | Taxes Report > Shipping Tax |
|
||||
| Discounted orders | The count of orders with a coupon applied. | Coupons Report > Orders Count |
|
||||
| Net discount amount | Total sum of discounts from coupons. | Coupons Report > Amount |
|
||||
| Total tax | Order tax + Shipping tax | Taxes Report > Total tax |
|
||||
| Order tax | The total of tax applied to items in an order | Taxes Report > Order tax |
|
||||
| Shipping tax | The total of tax applied to shipping in an order | Taxes Report > Shipping tax |
|
||||
| Shipping | The shipping charges associated with an order or refund. | Revenue Report > Shipping |
|
||||
| Downloads | Total count of downloaded files | Downloads Report > Download Count |
|
||||
| Gross Sales | Sale price of product(s) x quantity ordered. Does not include refunds, coupons, taxes or shipping | Revenue Report > Gross Sales |
|
||||
| Gross sales | Sale price of product(s) x quantity ordered. Does not include refunds, coupons, taxes or shipping | Revenue Report > Gross sales |
|
||||
|
||||
## Charts Section
|
||||
The next section displayed by default is Charts. The customization menu again allows you to toggle the display of charts that are most useful for your Store. The following charts are available to display in this section:
|
||||
|
||||
| Chart Name | Description | Links To ( Report Name > Chart Name ) |
|
||||
|---|---|---|
|
||||
| Total Sales | Gross Sales - Returns - Coupons + Taxes + Shipping | Revenue Report > Total Sales |
|
||||
| Net Sales | Gross Sales - Returns - Coupons | Revenue Report > Net Sales |
|
||||
| Total sales | Gross sales - Returns - Coupons + Taxes + Shipping | Revenue Report > Total sales |
|
||||
| Net sales | Gross sales - Returns - Coupons | Revenue Report > Net sales |
|
||||
| Orders | The number of new orders placed for a selected date range | Orders Report > Orders |
|
||||
| Average Order Value | Net Sales / Orders | Orders Report > Average Order Value |
|
||||
| Items Sold | The discrete number of items sold. | Products Report > Items Sold |
|
||||
| Average order value | Net sales / Orders | Orders Report > Average order value |
|
||||
| Items sold | The discrete number of items sold. | Products Report > Items sold |
|
||||
| Refunds | Money returned to the customer via a refund | Revenue Report > Refunds |
|
||||
| Discounted Orders | The count of orders with a coupon applied. | Coupons Report > Orders Count |
|
||||
| Discounted orders | The count of orders with a coupon applied. | Coupons Report > Orders Count |
|
||||
| Gross Discount Amount | Total sum of discounts from coupons. | Coupons Report > Amount |
|
||||
| Total Tax | Order Tax + Shipping Tax | Taxes Report > Total Tax |
|
||||
| Order Tax | The total of tax applied to items in an order | Taxes Report > Order Tax |
|
||||
| Shipping Tax | The total of tax applied to shipping in an order | Taxes Report > Shipping Tax |
|
||||
| Total tax | Order tax + Shipping tax | Taxes Report > Total tax |
|
||||
| Order tax | The total of tax applied to items in an order | Taxes Report > Order tax |
|
||||
| Shipping tax | The total of tax applied to shipping in an order | Taxes Report > Shipping tax |
|
||||
| Shipping | The shipping charges associated with an order or refund. | Revenue Report > Shipping |
|
||||
| Downloads | Total count of downloaded files | Downloads Report > Download Count |
|
||||
|
||||
|
@ -74,5 +74,5 @@ The final section on the Dashboard allows you to view four different "Leaderboar
|
|||
|
||||
- Top Customers, Total Spend
|
||||
- Top Coupons, Number of Orders
|
||||
- Top Categories, Items Sold
|
||||
- Top Products, Items Sold
|
||||
- Top categories, Items sold
|
||||
- Top products, Items sold
|
|
@ -4,7 +4,7 @@ The Downloads Report provides insight into the performance of your store's downl
|
|||
|
||||
### All Downloads View
|
||||
|
||||
By default, the Downloads Report displays the unfiltered All Downloads View. Each download is represented in the table and chart.
|
||||
By default, the Downloads Report displays the unfiltered `All downloads` View. Each download is represented in the table and chart.
|
||||
|
||||
![Downloads Report All Downloads View](images/analytics-downloads-report.png)
|
||||
|
||||
|
@ -24,4 +24,4 @@ There are several filters available to the Downloads Report:
|
|||
The report table allows sorting by the following columns:
|
||||
|
||||
- Date
|
||||
- Product Title
|
||||
- Product title
|
||||
|
|
|
@ -8,7 +8,7 @@ Stores with existing Orders will be prompted to import their data:
|
|||
|
||||
### Starting the Import
|
||||
|
||||
To start a historical data import, use the prompt above or go to Analytics > Settings, and scroll down to Import Historical Data.
|
||||
To start a historical data import, use the prompt above or go to Analytics > Settings, and scroll down to Import historical data.
|
||||
|
||||
![Analytics > Settings > Import historical data](images/analytics-historical-data-import-ready-to-import.png)
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ The following fields can be used for filtering:
|
|||
- Order Status
|
||||
- Products
|
||||
- Coupon Codes
|
||||
- Customer Type
|
||||
- Customer type
|
||||
- Refunds
|
||||
- Tax Rates
|
||||
|
||||
|
@ -33,7 +33,7 @@ The following fields can be used for filtering:
|
|||
The report table allows sorting by the following columns:
|
||||
|
||||
- Date
|
||||
- Items Sold
|
||||
- Net Sales
|
||||
- Items sold
|
||||
- Net sales
|
||||
|
||||
By default, the report shows the most recent orders.
|
||||
|
|
|
@ -4,7 +4,7 @@ The Products Report provides insight into the sales performance of each product
|
|||
|
||||
### All Products View
|
||||
|
||||
By default, the Products Report displays the All Products view. All products that have had sales in the specified date range will be shown.
|
||||
By default, the Products Report displays the `All products` view. All products that have had sales in the specified date range will be shown.
|
||||
|
||||
![Products Report All Products View](images/analytics-products-report.png)
|
||||
|
||||
|
@ -12,7 +12,7 @@ By default, the Products Report displays the All Products view. All products tha
|
|||
|
||||
![Products Report Single Product Search](images/analytics-products-report-single-product-search.png)
|
||||
|
||||
By selecting "Single Product", you can search for a single product to display report data for.
|
||||
By selecting "Single product", you can search for a single product to display report data for.
|
||||
|
||||
![Products Report Single Product View](images/analytics-products-report-single-product.png)
|
||||
|
||||
|
@ -40,10 +40,10 @@ It also allows partial string matching on product names.
|
|||
|
||||
The report table contains the following columns:
|
||||
|
||||
- Product Title - links to Single Product view
|
||||
- Product title - links to Single product view
|
||||
- SKU
|
||||
- Items Sold (count)
|
||||
- Net Sales
|
||||
- Items sold (count)
|
||||
- Net sales
|
||||
- Orders (count) - links to Orders Report filtered by product
|
||||
- Category - links to Categories Report
|
||||
- Variations (count)
|
||||
|
@ -54,10 +54,10 @@ The report table contains the following columns:
|
|||
|
||||
The report table allows sorting by the following columns:
|
||||
|
||||
- Product Title
|
||||
- Product title
|
||||
- SKU
|
||||
- Items Sold (count)
|
||||
- Net Sales
|
||||
- Items sold (count)
|
||||
- Net sales
|
||||
- Orders (count)
|
||||
- Variations (count)
|
||||
|
||||
|
@ -65,7 +65,7 @@ By default, the report sorts products by most items sold.
|
|||
|
||||
#### Clarifying Terms
|
||||
|
||||
"Net Sales" is calculated by subtracting refunds and coupons from the sale price of the product(s).
|
||||
"Net sales" is calculated by subtracting refunds and coupons from the sale price of the product(s).
|
||||
|
||||
As an equation, it might look like: `(product price * quantity) - refunds - coupons`.
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@ The report table allows sorting by the all report columns:
|
|||
|
||||
- Date
|
||||
- Orders (# of orders)
|
||||
- Gross Sales
|
||||
- Gross sales
|
||||
- Returns (Return amount)
|
||||
- Coupons (Coupon amount)
|
||||
- Net Sales
|
||||
- Net sales
|
||||
- Taxes
|
||||
- Shipping
|
||||
- Total Sales
|
||||
- Total sales
|
||||
|
||||
By default, the report shows the most recent days.
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ WooCommerce Admin is pre-configured with default settings for WooCommerce Analyt
|
|||
- Excluded Statuses
|
||||
- Actionable Statuses - See [Activity Panels](activity-panels.md) for details
|
||||
- Default Date Range
|
||||
- Import Historical Data - See [Importing Historical Data](analytics-historical-data-import.md) for details
|
||||
- Reset Defaults
|
||||
- Import historical data - See [Importing Historical Data](analytics-historical-data-import.md) for details
|
||||
- Reset defaults
|
||||
|
||||
### Excluded Statuses
|
||||
|
||||
|
@ -18,8 +18,8 @@ In this section, statuses that are **unchecked** are **included** in anayltics r
|
|||
|
||||
![Default Date Range setting](images/settings-default-date-range.png)
|
||||
|
||||
WooCommerce Admin is pre-configured with a default date range of `Month to Date`. This is the date range that will be used when loading the WooCommerce Dashboard or Analytics page from any non-WooCommerce Admin page. Any reports that support a date range will have a Date Range Picker to allow changing the date range for the report.
|
||||
WooCommerce Admin is pre-configured with a default date range of `Month to date`. This is the date range that will be used when loading the WooCommerce Dashboard or Analytics page from any non-WooCommerce Admin page. Any reports that support a date range will have a Date Range Picker to allow changing the date range for the report.
|
||||
|
||||
### Reset Defaults
|
||||
|
||||
The `Reset Defaults` button resets the settings to default values for all of the settings above the button. It has no effect on the data imported via `Import Historical Data`.
|
||||
The `Reset defaults` button resets the settings to default values for all of the settings above the button. It has no effect on the data imported via `Import historical data`.
|
|
@ -7,7 +7,7 @@ The Stock Report provides insight about the inventory of your store. This report
|
|||
|
||||
### Report Filter
|
||||
|
||||
The Stock Report allow you to filter the report by stock status. **Note:** Products that do not have stock management enabled are shown as `Out of Stock`.
|
||||
The Stock Report allow you to filter the report by stock status. **Note:** Products that do not have stock management enabled are shown as `Out of stock`.
|
||||
|
||||
![Stock Report Filter](images/analytics-stock-status-filter.png)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ The Taxes Report provides insight into taxes collected on your store.
|
|||
|
||||
### All Taxes View
|
||||
|
||||
By default, the Taxes Report displays the All Taxes view. All taxes that have been collected in the specified date range will be shown.
|
||||
By default, the Taxes Report displays the `All taxes` view. All taxes that have been collected in the specified date range will be shown.
|
||||
|
||||
![Taxes Report All Taxes View](images/analytics-taxes-report.png)
|
||||
|
||||
|
@ -30,15 +30,15 @@ It also allows partial string matching on tax codes.
|
|||
|
||||
The report table allows sorting by the following columns:
|
||||
|
||||
- Tax Code
|
||||
- Tax code
|
||||
- Rate
|
||||
- Total Tax (Order Tax + Shipping Tax)
|
||||
- Order Tax
|
||||
- Shipping Tax
|
||||
- Total tax (Order tax + Shipping tax)
|
||||
- Order tax
|
||||
- Shipping tax
|
||||
- Orders (count)
|
||||
|
||||
By default, the report is sorted by the creation date of the tax codes.
|
||||
|
||||
### Report Links
|
||||
|
||||
The `Tax Code` column links to the Orders Report, filtered by the selected tax code.
|
||||
The `Tax code` column links to the Orders Report, filtered by the selected tax code.
|
||||
|
|
|
@ -4,7 +4,7 @@ The Variations Report provides insight into the sales performance of each Produc
|
|||
|
||||
### All Variations View
|
||||
|
||||
By default, the Variations Report displays the All Variations view. All Variations that have had sales in the specified date range will be shown.
|
||||
By default, the Variations Report displays the `All variations` view. All variations that have had sales in the specified date range will be shown.
|
||||
|
||||
![Variations Report All Variations View](images/analytics-variations-report.png)
|
||||
|
||||
|
@ -12,9 +12,9 @@ By default, the Variations Report displays the All Variations view. All Variatio
|
|||
|
||||
![Variations Report Single Variation Search](images/analytics-variations-report-single-variation-search.png)
|
||||
|
||||
By selecting "Single Variation", you can search for a single variation to display report data for.
|
||||
By selecting "Single variation", you can search for a single variation to display report data for.
|
||||
|
||||
![Variations Report Single Variation View](images/analytics-variations-report-single-variation.png)
|
||||
![Variations Report Single variation View](images/analytics-variations-report-single-variation.png)
|
||||
|
||||
### Comparison Mode
|
||||
|
||||
|
@ -41,16 +41,16 @@ The following fields can be used for filtering:
|
|||
- Product (parent product)
|
||||
- Category
|
||||
|
||||
![Variations Report Advanced Filters](images/analytics-variations-report-advanced-filters.png)
|
||||
![Variations Report Advanced filters](images/analytics-variations-report-advanced-filters.png)
|
||||
|
||||
### Report Columns
|
||||
|
||||
The report table contains the following columns:
|
||||
|
||||
- Variation Title - links to Edit Product screen
|
||||
- Variation title - links to Edit Product screen
|
||||
- SKU
|
||||
- Items Sold (count)
|
||||
- Net Sales
|
||||
- Items sold (count)
|
||||
- Net sales
|
||||
- Orders (count) - links to Orders Report filtered by Variation
|
||||
- Status (in/out stock)
|
||||
- Stock (inventory quantity)
|
||||
|
@ -60,15 +60,15 @@ The report table contains the following columns:
|
|||
The report table allows sorting by the following columns:
|
||||
|
||||
- SKU
|
||||
- Items Sold (count)
|
||||
- Net Sales
|
||||
- Items sold (count)
|
||||
- Net sales
|
||||
- Orders (count)
|
||||
|
||||
By default, the report sorts Variations by most items sold.
|
||||
|
||||
#### Clarifying Terms
|
||||
|
||||
"Net Sales" is calculated by subtracting refunds and coupons from the sale price of the variation(s).
|
||||
"Net sales" is calculated by subtracting refunds and coupons from the sale price of the variation(s).
|
||||
|
||||
As an equation, it might look like: `(variation price * quantity) - refunds - coupons`.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Displays a configurable set of filters which can modify query parameters. Displa
|
|||
|
||||
## Usage
|
||||
|
||||
Below is a config example complete with translation strings. Advanced Filters makes use of [interpolateComponents](https://github.com/Automattic/interpolate-components#readme) to organize sentence structure, resulting in a filter visually represented as a sentence fragment in any language.
|
||||
Below is a config example complete with translation strings. Advanced filters makes use of [interpolateComponents](https://github.com/Automattic/interpolate-components#readme) to organize sentence structure, resulting in a filter visually represented as a sentence fragment in any language.
|
||||
|
||||
```js
|
||||
const config = {
|
||||
|
|
|
@ -78,7 +78,7 @@ const advancedFilters = {
|
|||
},
|
||||
customer: {
|
||||
labels: {
|
||||
add: 'Customer Type',
|
||||
add: 'Customer type',
|
||||
remove: 'Remove customer filter',
|
||||
rule: 'Select a customer filter match',
|
||||
title: '{{title}}Customer is{{/title}} {{filter /}}',
|
||||
|
|
|
@ -23,7 +23,7 @@ const DateRangeExample = withState( {
|
|||
|
||||
return (
|
||||
<>
|
||||
<H>Date Range Picker</H>
|
||||
<H>Date range picker</H>
|
||||
<Section component={ false }>
|
||||
<DateRange
|
||||
after={ after }
|
||||
|
|
|
@ -135,7 +135,7 @@ class DateRangeFilterPicker extends Component {
|
|||
return (
|
||||
<div className="woocommerce-filters-filter">
|
||||
<span className="woocommerce-filters-label">
|
||||
{ __( 'Date Range', 'woocommerce-admin' ) }:
|
||||
{ __( 'Date range', 'woocommerce-admin' ) }:
|
||||
</span>
|
||||
<Dropdown
|
||||
contentClassName={ contentClasses }
|
||||
|
|
|
@ -11,7 +11,7 @@ A button useful for a launcher of a dropdown component. The button is 100% width
|
|||
<DropdownButton
|
||||
onClick={ onToggle }
|
||||
isOpen={ isOpen }
|
||||
labels={ [ 'All Products Sold' ] }
|
||||
labels={ [ 'All products Sold' ] }
|
||||
/>
|
||||
) }
|
||||
renderContent={ () => (
|
||||
|
|
|
@ -10,7 +10,7 @@ export const Basic = () => (
|
|||
<DropdownButton
|
||||
onClick={ onToggle }
|
||||
isOpen={ isOpen }
|
||||
labels={ [ 'All Products Sold' ] }
|
||||
labels={ [ 'All products Sold' ] }
|
||||
/>
|
||||
) }
|
||||
renderContent={ () => <p>Dropdown content here</p> }
|
||||
|
|
|
@ -10,7 +10,7 @@ This is a dropdown menu hidden behind a vertical ellipsis icon. When clicked, th
|
|||
renderContent={ ( { onToggle } )=> {
|
||||
return (
|
||||
<div>
|
||||
<MenuTitle>Display Stats</MenuTitle>
|
||||
<MenuTitle>Display stats</MenuTitle>
|
||||
<MenuItem onInvoke={ () => setState( { showCustomers: ! showCustomers } ) }>
|
||||
<ToggleControl
|
||||
label="Show Customers"
|
||||
|
@ -87,7 +87,7 @@ MenuTitle
|
|||
## Usage
|
||||
|
||||
```jsx
|
||||
<MenuTitle>Display Stats</MenuTitle>
|
||||
<MenuTitle>Display stats</MenuTitle>
|
||||
```
|
||||
|
||||
### Props
|
||||
|
|
|
@ -15,7 +15,7 @@ const ExampleEllipsisMenu = withState( {
|
|||
label="Choose which analytics to display"
|
||||
renderContent={ ( { onToggle } ) => (
|
||||
<Fragment>
|
||||
<MenuTitle>Display Stats</MenuTitle>
|
||||
<MenuTitle>Display stats</MenuTitle>
|
||||
<MenuItem
|
||||
isCheckbox
|
||||
isClickable
|
||||
|
|
|
@ -51,8 +51,8 @@ const filters = [
|
|||
param: 'filter',
|
||||
showFilters: () => true,
|
||||
filters: [
|
||||
{ label: 'All Orders', value: 'all' },
|
||||
{ label: 'Advanced Filters', value: 'advanced' },
|
||||
{ label: 'All orders', value: 'all' },
|
||||
{ label: 'Advanced filters', value: 'advanced' },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
@ -113,7 +113,7 @@ const advancedFilters = {
|
|||
},
|
||||
customer: {
|
||||
labels: {
|
||||
add: 'Customer Type',
|
||||
add: 'Customer type',
|
||||
remove: 'Remove customer filter',
|
||||
rule: 'Select a customer filter match',
|
||||
title: 'Customer is {{filter /}}',
|
||||
|
@ -217,7 +217,7 @@ export const Examples = () => (
|
|||
/>
|
||||
</Section>
|
||||
|
||||
<H>Advanced Filters</H>
|
||||
<H>Advanced filters</H>
|
||||
<Section component={ false }>
|
||||
<AdvancedFilters
|
||||
siteLocale={ siteLocale }
|
||||
|
|
|
@ -6,7 +6,7 @@ A header component. The header can contain a title, actions via children, and an
|
|||
## Usage
|
||||
|
||||
```jsx
|
||||
<SectionHeader title="Section Title" />
|
||||
<SectionHeader title="Section title" />
|
||||
```
|
||||
|
||||
### Props
|
||||
|
|
|
@ -12,7 +12,7 @@ A container element for a list of SummaryNumbers. This component handles detecti
|
|||
<SummaryNumber
|
||||
key="revenue"
|
||||
value={ '$829.40' }
|
||||
label="Total Sales"
|
||||
label="Total sales"
|
||||
delta={ 29 }
|
||||
href="/analytics/report"
|
||||
>
|
||||
|
@ -57,7 +57,7 @@ Name | Type | Default | Description
|
|||
`isOpen` | Boolean | `false` | Boolean describing whether the menu list is open. Only applies in mobile view, and only applies to the toggle-able item (first in the list)
|
||||
`label` | String | `null` | (required) A string description of this value, ex "Revenue", or "New Customers"
|
||||
`onToggle` | Function | `null` | A function used to switch the given SummaryNumber to a button, and called on click
|
||||
`prevLabel` | String | `__( 'Previous Period:', 'woocommerce-admin' )` | A string description of the previous value's timeframe, ex "Previous Year:"
|
||||
`prevLabel` | String | `__( 'Previous period:', 'woocommerce-admin' )` | A string description of the previous value's timeframe, ex "Previous year:"
|
||||
`prevValue` | One of type: number, string | `null` | A string or number value to display - a string is allowed so we can accept currency formatting. If omitted, this section won't display
|
||||
`reverseTrend` | Boolean | `false` | A boolean used to indicate that a negative delta is "good", and should be styled like a positive (and vice-versa)
|
||||
`selected` | Boolean | `false` | A boolean used to show a highlight style on this number
|
||||
|
|
|
@ -184,7 +184,7 @@ SummaryNumber.propTypes = {
|
|||
*/
|
||||
onToggle: PropTypes.func,
|
||||
/**
|
||||
* A string description of the previous value's timeframe, ex "Previous Year:".
|
||||
* A string description of the previous value's timeframe, ex "Previous year:".
|
||||
*/
|
||||
prevLabel: PropTypes.string,
|
||||
/**
|
||||
|
@ -214,7 +214,7 @@ SummaryNumber.defaultProps = {
|
|||
href: '',
|
||||
hrefType: 'wc-admin',
|
||||
isOpen: false,
|
||||
prevLabel: __( 'Previous Period:', 'woocommerce-admin' ),
|
||||
prevLabel: __( 'Previous period:', 'woocommerce-admin' ),
|
||||
reverseTrend: false,
|
||||
selected: false,
|
||||
onLinkClickCallback: noop,
|
||||
|
|
|
@ -10,7 +10,7 @@ export const Basic = () => (
|
|||
<SummaryNumber
|
||||
key="revenue"
|
||||
value={ '$829.40' }
|
||||
label="Total Sales"
|
||||
label="Total sales"
|
||||
delta={ 29 }
|
||||
href="/analytics/report"
|
||||
>
|
||||
|
|
|
@ -40,7 +40,7 @@ const summary = [
|
|||
];
|
||||
|
||||
<TableCard
|
||||
title="Revenue Last Week"
|
||||
title="Revenue last week"
|
||||
rows={ rows }
|
||||
headers={ headers }
|
||||
query={ { page: 2 } }
|
||||
|
@ -132,7 +132,7 @@ const headers = [
|
|||
];
|
||||
|
||||
<TablePlaceholder
|
||||
caption="Revenue Last Week"
|
||||
caption="Revenue last week"
|
||||
headers={ headers }
|
||||
/>
|
||||
```
|
||||
|
@ -221,7 +221,7 @@ const rows = [
|
|||
|
||||
```jsx
|
||||
<Table
|
||||
caption="Revenue Last Week"
|
||||
caption="Revenue last week"
|
||||
rows={ rows }
|
||||
headers={ headers }
|
||||
rowKey={ row => row.display }
|
||||
|
|
|
@ -19,7 +19,7 @@ const TableCardExample = withState( {
|
|||
},
|
||||
} )( ( { query, setState } ) => (
|
||||
<TableCard
|
||||
title="Revenue Last Week"
|
||||
title="Revenue last week"
|
||||
rows={ rows }
|
||||
headers={ headers }
|
||||
onQueryChange={ ( param ) => ( value ) =>
|
||||
|
|
|
@ -11,7 +11,7 @@ import { headers } from './index';
|
|||
|
||||
export const Basic = () => (
|
||||
<Card size={ null }>
|
||||
<TablePlaceholder caption="Revenue Last Week" headers={ headers } />
|
||||
<TablePlaceholder caption="Revenue last week" headers={ headers } />
|
||||
</Card>
|
||||
);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { rows, headers } from './index';
|
|||
export const Basic = () => (
|
||||
<Card size={ null }>
|
||||
<Table
|
||||
caption="Revenue Last Week"
|
||||
caption="Revenue last week"
|
||||
rows={ rows }
|
||||
headers={ headers }
|
||||
rowKey={ ( row ) => row[ 0 ].value }
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export default `Date,Orders,Total Sales,Refunds,Taxes,Shipping,Net Sales
|
||||
export default `Date,Orders,Total sales,Refunds,Taxes,Shipping,Net sales
|
||||
2018-10-01 00:00:00,1,411,0,0,0,411
|
||||
2018-10-02 00:00:00,0,0,,0,0,0`;
|
||||
|
|
|
@ -10,7 +10,7 @@ export default [
|
|||
required: false,
|
||||
},
|
||||
{
|
||||
label: 'Total Sales',
|
||||
label: 'Total sales',
|
||||
key: 'total_sales',
|
||||
required: true,
|
||||
},
|
||||
|
@ -31,7 +31,7 @@ export default [
|
|||
key: 'shipping',
|
||||
},
|
||||
{
|
||||
label: 'Net Sales',
|
||||
label: 'Net sales',
|
||||
key: 'net_revenue',
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export default `Date,Orders,Description,"Total Sales",Refunds,Coupons,Taxes,Shipping,"Net Sales","Negative Number"
|
||||
export default `Date,Orders,Description,"Total sales",Refunds,Coupons,Taxes,Shipping,"Net sales","Negative number"
|
||||
2018-04-29T00:00:00,30,"Lorem, ""ipsum""",200,19,19,100,19,200,"\t-123"`;
|
||||
|
|
|
@ -12,7 +12,7 @@ export default [
|
|||
key: 'description',
|
||||
},
|
||||
{
|
||||
label: 'Total Sales',
|
||||
label: 'Total sales',
|
||||
key: 'total_sales',
|
||||
},
|
||||
{
|
||||
|
@ -32,11 +32,11 @@ export default [
|
|||
key: 'shipping',
|
||||
},
|
||||
{
|
||||
label: 'Net Sales',
|
||||
label: 'Net sales',
|
||||
key: 'net_revenue',
|
||||
},
|
||||
{
|
||||
label: 'Negative Number',
|
||||
label: 'Negative number',
|
||||
key: 'neg_num',
|
||||
},
|
||||
];
|
||||
|
|
|
@ -33,25 +33,25 @@ export const defaultDateTimeFormat = 'YYYY-MM-DDTHH:mm:ss';
|
|||
export const presetValues = [
|
||||
{ value: 'today', label: __( 'Today', 'woocommerce-admin' ) },
|
||||
{ value: 'yesterday', label: __( 'Yesterday', 'woocommerce-admin' ) },
|
||||
{ value: 'week', label: __( 'Week to Date', 'woocommerce-admin' ) },
|
||||
{ value: 'last_week', label: __( 'Last Week', 'woocommerce-admin' ) },
|
||||
{ value: 'month', label: __( 'Month to Date', 'woocommerce-admin' ) },
|
||||
{ value: 'last_month', label: __( 'Last Month', 'woocommerce-admin' ) },
|
||||
{ value: 'quarter', label: __( 'Quarter to Date', 'woocommerce-admin' ) },
|
||||
{ value: 'last_quarter', label: __( 'Last Quarter', 'woocommerce-admin' ) },
|
||||
{ value: 'year', label: __( 'Year to Date', 'woocommerce-admin' ) },
|
||||
{ value: 'last_year', label: __( 'Last Year', 'woocommerce-admin' ) },
|
||||
{ value: 'week', label: __( 'Week to date', 'woocommerce-admin' ) },
|
||||
{ value: 'last_week', label: __( 'Last week', 'woocommerce-admin' ) },
|
||||
{ value: 'month', label: __( 'Month to date', 'woocommerce-admin' ) },
|
||||
{ value: 'last_month', label: __( 'Last month', 'woocommerce-admin' ) },
|
||||
{ value: 'quarter', label: __( 'Quarter to date', 'woocommerce-admin' ) },
|
||||
{ value: 'last_quarter', label: __( 'Last quarter', 'woocommerce-admin' ) },
|
||||
{ value: 'year', label: __( 'Year to date', 'woocommerce-admin' ) },
|
||||
{ value: 'last_year', label: __( 'Last year', 'woocommerce-admin' ) },
|
||||
{ value: 'custom', label: __( 'Custom', 'woocommerce-admin' ) },
|
||||
];
|
||||
|
||||
export const periods = [
|
||||
{
|
||||
value: 'previous_period',
|
||||
label: __( 'Previous Period', 'woocommerce-admin' ),
|
||||
label: __( 'Previous period', 'woocommerce-admin' ),
|
||||
},
|
||||
{
|
||||
value: 'previous_year',
|
||||
label: __( 'Previous Year', 'woocommerce-admin' ),
|
||||
label: __( 'Previous year', 'woocommerce-admin' ),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -72,12 +72,12 @@ global.wcSettings = {
|
|||
performanceIndicators: [
|
||||
{
|
||||
chart: 'total_sales',
|
||||
label: 'Total Sales',
|
||||
label: 'Total sales',
|
||||
stat: 'revenue/total_sales',
|
||||
},
|
||||
{
|
||||
chart: 'net_revenue',
|
||||
label: 'Net Sales',
|
||||
label: 'Net sales',
|
||||
stat: 'revenue/net_revenue',
|
||||
},
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ global.wcSettings = {
|
|||
},
|
||||
{
|
||||
chart: 'items_sold',
|
||||
label: 'Items Sold',
|
||||
label: 'Items sold',
|
||||
stat: 'products/items_sold',
|
||||
},
|
||||
],
|
||||
|
|
|
@ -294,7 +294,7 @@ describe( 'getDefaultOptionValue', () => {
|
|||
it( 'should return the default option value', () => {
|
||||
const options = [ { value: 'new' }, { value: 'returning' } ];
|
||||
const currentFilter = {
|
||||
labels: { add: 'Customer Type' },
|
||||
labels: { add: 'Customer type' },
|
||||
input: {
|
||||
component: 'SelectControl',
|
||||
options,
|
||||
|
@ -308,7 +308,7 @@ describe( 'getDefaultOptionValue', () => {
|
|||
it( 'should return the first option value when no default option', () => {
|
||||
const options = [ { value: 'new' }, { value: 'returning' } ];
|
||||
const currentFilter = {
|
||||
labels: { add: 'Customer Type' },
|
||||
labels: { add: 'Customer type' },
|
||||
input: {
|
||||
component: 'SelectControl',
|
||||
options,
|
||||
|
|
|
@ -122,13 +122,13 @@ class Leaderboards extends \WC_REST_Data_Controller {
|
|||
'label' => __( 'Top Coupons - Number of Orders', 'woocommerce-admin' ),
|
||||
'headers' => array(
|
||||
array(
|
||||
'label' => __( 'Coupon Code', 'woocommerce-admin' ),
|
||||
'label' => __( 'Coupon code', 'woocommerce-admin' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Orders', 'woocommerce-admin' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Amount Discounted', 'woocommerce-admin' ),
|
||||
'label' => __( 'Amount discounted', 'woocommerce-admin' ),
|
||||
),
|
||||
),
|
||||
'rows' => $rows,
|
||||
|
@ -188,16 +188,16 @@ class Leaderboards extends \WC_REST_Data_Controller {
|
|||
|
||||
return array(
|
||||
'id' => 'categories',
|
||||
'label' => __( 'Top Categories - Items Sold', 'woocommerce-admin' ),
|
||||
'label' => __( 'Top categories - Items sold', 'woocommerce-admin' ),
|
||||
'headers' => array(
|
||||
array(
|
||||
'label' => __( 'Category', 'woocommerce-admin' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Items Sold', 'woocommerce-admin' ),
|
||||
'label' => __( 'Items sold', 'woocommerce-admin' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Net Sales', 'woocommerce-admin' ),
|
||||
'label' => __( 'Net sales', 'woocommerce-admin' ),
|
||||
),
|
||||
),
|
||||
'rows' => $rows,
|
||||
|
@ -324,16 +324,16 @@ class Leaderboards extends \WC_REST_Data_Controller {
|
|||
|
||||
return array(
|
||||
'id' => 'products',
|
||||
'label' => __( 'Top Products - Items Sold', 'woocommerce-admin' ),
|
||||
'label' => __( 'Top products - Items sold', 'woocommerce-admin' ),
|
||||
'headers' => array(
|
||||
array(
|
||||
'label' => __( 'Product', 'woocommerce-admin' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Items Sold', 'woocommerce-admin' ),
|
||||
'label' => __( 'Items sold', 'woocommerce-admin' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Net Sales', 'woocommerce-admin' ),
|
||||
'label' => __( 'Net sales', 'woocommerce-admin' ),
|
||||
),
|
||||
),
|
||||
'rows' => $rows,
|
||||
|
|
|
@ -176,7 +176,7 @@ class Controller extends ReportsController implements ExportableInterface {
|
|||
'readonly' => true,
|
||||
),
|
||||
'net_revenue' => array(
|
||||
'description' => __( 'Total Sales.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Total sales.', 'woocommerce-admin' ),
|
||||
'type' => 'number',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
|
@ -327,7 +327,7 @@ class Controller extends ReportsController implements ExportableInterface {
|
|||
public function get_export_columns() {
|
||||
$export_columns = array(
|
||||
'category' => __( 'Category', 'woocommerce-admin' ),
|
||||
'items_sold' => __( 'Items Sold', 'woocommerce-admin' ),
|
||||
'items_sold' => __( 'Items sold', 'woocommerce-admin' ),
|
||||
'net_revenue' => __( 'Net Revenue', 'woocommerce-admin' ),
|
||||
'products_count' => __( 'Products', 'woocommerce-admin' ),
|
||||
'orders_count' => __( 'Orders', 'woocommerce-admin' ),
|
||||
|
|
|
@ -296,9 +296,9 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
|
|||
*/
|
||||
public function get_export_columns() {
|
||||
$export_columns = array(
|
||||
'code' => __( 'Coupon Code', 'woocommerce-admin' ),
|
||||
'code' => __( 'Coupon code', 'woocommerce-admin' ),
|
||||
'orders_count' => __( 'Orders', 'woocommerce-admin' ),
|
||||
'amount' => __( 'Amount Discounted', 'woocommerce-admin' ),
|
||||
'amount' => __( 'Amount discounted', 'woocommerce-admin' ),
|
||||
'created' => __( 'Created', 'woocommerce-admin' ),
|
||||
'expires' => __( 'Expires', 'woocommerce-admin' ),
|
||||
'type' => __( 'Type', 'woocommerce-admin' ),
|
||||
|
|
|
@ -155,7 +155,7 @@ class Controller extends \WC_REST_Reports_Controller {
|
|||
'readonly' => true,
|
||||
),
|
||||
'orders_count' => array(
|
||||
'title' => __( 'Discounted Orders', 'woocommerce-admin' ),
|
||||
'title' => __( 'Discounted orders', 'woocommerce-admin' ),
|
||||
'description' => __( 'Number of discounted orders.', 'woocommerce-admin' ),
|
||||
'type' => 'integer',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
|
|
|
@ -389,8 +389,8 @@ class Controller extends ReportsController implements ExportableInterface {
|
|||
public function get_export_columns() {
|
||||
$export_columns = array(
|
||||
'date' => __( 'Date', 'woocommerce-admin' ),
|
||||
'product' => __( 'Product Title', 'woocommerce-admin' ),
|
||||
'file_name' => __( 'File Name', 'woocommerce-admin' ),
|
||||
'product' => __( 'Product title', 'woocommerce-admin' ),
|
||||
'file_name' => __( 'File name', 'woocommerce-admin' ),
|
||||
'order_number' => __( 'Order #', 'woocommerce-admin' ),
|
||||
'user_id' => __( 'User Name', 'woocommerce-admin' ),
|
||||
'ip_address' => __( 'IP', 'woocommerce-admin' ),
|
||||
|
|
|
@ -532,12 +532,12 @@ class Controller extends ReportsController implements ExportableInterface {
|
|||
$export_columns = array(
|
||||
'date_created' => __( 'Date', 'woocommerce-admin' ),
|
||||
'order_number' => __( 'Order #', 'woocommerce-admin' ),
|
||||
'total_formatted' => __( 'N. Revenue (Formatted)', 'woocommerce-admin' ),
|
||||
'total_formatted' => __( 'N. Revenue (formatted)', 'woocommerce-admin' ),
|
||||
'status' => __( 'Status', 'woocommerce-admin' ),
|
||||
'customer_name' => __( 'Customer', 'woocommerce-admin' ),
|
||||
'customer_type' => __( 'Customer Type', 'woocommerce-admin' ),
|
||||
'customer_type' => __( 'Customer type', 'woocommerce-admin' ),
|
||||
'products' => __( 'Product(s)', 'woocommerce-admin' ),
|
||||
'num_items_sold' => __( 'Items Sold', 'woocommerce-admin' ),
|
||||
'num_items_sold' => __( 'Items sold', 'woocommerce-admin' ),
|
||||
'coupons' => __( 'Coupon(s)', 'woocommerce-admin' ),
|
||||
'net_total' => __( 'N. Revenue', 'woocommerce-admin' ),
|
||||
);
|
||||
|
|
|
@ -160,7 +160,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller {
|
|||
public function get_item_schema() {
|
||||
$data_values = array(
|
||||
'net_revenue' => array(
|
||||
'description' => __( 'Net Sales.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Net sales.', 'woocommerce-admin' ),
|
||||
'type' => 'number',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
|
|
|
@ -59,7 +59,7 @@ class Segmenter extends ReportsSegmenter {
|
|||
|
||||
/**
|
||||
* Returns column => query mapping to be used for order-level segmenting query
|
||||
* (e.g. avg items per order or Net Sales when segmented by coupons).
|
||||
* (e.g. avg items per order or Net sales when segmented by coupons).
|
||||
*
|
||||
* @param string $order_stats_table Name of SQL table containing the order-level info.
|
||||
* @param array $overrides Array of overrides for default column calculations.
|
||||
|
|
|
@ -173,7 +173,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
|
|||
'type' => 'number',
|
||||
'readonly' => true,
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'description' => __( 'Total Net Sales of all items sold.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Total Net sales of all items sold.', 'woocommerce-admin' ),
|
||||
),
|
||||
'orders_count' => array(
|
||||
'type' => 'integer',
|
||||
|
@ -385,9 +385,9 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
|
|||
*/
|
||||
public function get_export_columns() {
|
||||
$export_columns = array(
|
||||
'product_name' => __( 'Product Title', 'woocommerce-admin' ),
|
||||
'product_name' => __( 'Product title', 'woocommerce-admin' ),
|
||||
'sku' => __( 'SKU', 'woocommerce-admin' ),
|
||||
'items_sold' => __( 'Items Sold', 'woocommerce-admin' ),
|
||||
'items_sold' => __( 'Items sold', 'woocommerce-admin' ),
|
||||
'net_revenue' => __( 'N. Revenue', 'woocommerce-admin' ),
|
||||
'orders_count' => __( 'Orders', 'woocommerce-admin' ),
|
||||
'product_cat' => __( 'Category', 'woocommerce-admin' ),
|
||||
|
|
|
@ -156,7 +156,7 @@ class Controller extends \WC_REST_Reports_Controller {
|
|||
public function get_item_schema() {
|
||||
$data_values = array(
|
||||
'items_sold' => array(
|
||||
'title' => __( 'Products Sold', 'woocommerce-admin' ),
|
||||
'title' => __( 'Products sold', 'woocommerce-admin' ),
|
||||
'description' => __( 'Number of product items sold.', 'woocommerce-admin' ),
|
||||
'type' => 'integer',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
|
@ -164,7 +164,7 @@ class Controller extends \WC_REST_Reports_Controller {
|
|||
'indicator' => true,
|
||||
),
|
||||
'net_revenue' => array(
|
||||
'description' => __( 'Net Sales.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Net sales.', 'woocommerce-admin' ),
|
||||
'type' => 'number',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
|
|
|
@ -164,7 +164,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
|
|||
public function get_item_schema() {
|
||||
$data_values = array(
|
||||
'total_sales' => array(
|
||||
'description' => __( 'Total Sales.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Total sales.', 'woocommerce-admin' ),
|
||||
'type' => 'number',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
|
@ -172,7 +172,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
|
|||
'format' => 'currency',
|
||||
),
|
||||
'net_revenue' => array(
|
||||
'description' => __( 'Net Sales.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Net sales.', 'woocommerce-admin' ),
|
||||
'type' => 'number',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
|
@ -236,7 +236,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
|
|||
'readonly' => true,
|
||||
),
|
||||
'gross_sales' => array(
|
||||
'description' => __( 'Gross Sales.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Gross sales.', 'woocommerce-admin' ),
|
||||
'type' => 'number',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
|
@ -447,8 +447,8 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
|
|||
return array(
|
||||
'date' => __( 'Date', 'woocommerce-admin' ),
|
||||
'orders_count' => __( 'Orders', 'woocommerce-admin' ),
|
||||
'gross_sales' => __( 'Gross Sales', 'woocommerce-admin' ),
|
||||
'total_sales' => __( 'Total Sales', 'woocommerce-admin' ),
|
||||
'gross_sales' => __( 'Gross sales', 'woocommerce-admin' ),
|
||||
'total_sales' => __( 'Total sales', 'woocommerce-admin' ),
|
||||
'refunds' => __( 'Returns', 'woocommerce-admin' ),
|
||||
'coupons' => __( 'Coupons', 'woocommerce-admin' ),
|
||||
'taxes' => __( 'Taxes', 'woocommerce-admin' ),
|
||||
|
|
|
@ -299,11 +299,11 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
|
|||
*/
|
||||
public function get_export_columns() {
|
||||
return array(
|
||||
'tax_code' => __( 'Tax Code', 'woocommerce-admin' ),
|
||||
'tax_code' => __( 'Tax code', 'woocommerce-admin' ),
|
||||
'rate' => __( 'Rate', 'woocommerce-admin' ),
|
||||
'total_tax' => __( 'Total Tax', 'woocommerce-admin' ),
|
||||
'order_tax' => __( 'Order Tax', 'woocommerce-admin' ),
|
||||
'shipping_tax' => __( 'Shipping Tax', 'woocommerce-admin' ),
|
||||
'total_tax' => __( 'Total tax', 'woocommerce-admin' ),
|
||||
'order_tax' => __( 'Order tax', 'woocommerce-admin' ),
|
||||
'shipping_tax' => __( 'Shipping tax', 'woocommerce-admin' ),
|
||||
'orders_count' => __( 'Orders', 'woocommerce-admin' ),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ class Controller extends ReportsController implements ExportableInterface {
|
|||
'type' => 'number',
|
||||
'readonly' => true,
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'description' => __( 'Total Net Sales of all items sold.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Total Net sales of all items sold.', 'woocommerce-admin' ),
|
||||
),
|
||||
'orders_count' => array(
|
||||
'type' => 'integer',
|
||||
|
@ -409,9 +409,9 @@ class Controller extends ReportsController implements ExportableInterface {
|
|||
*/
|
||||
public function get_export_columns() {
|
||||
$export_columns = array(
|
||||
'product_name' => __( 'Product / Variation Title', 'woocommerce-admin' ),
|
||||
'product_name' => __( 'Product / Variation title', 'woocommerce-admin' ),
|
||||
'sku' => __( 'SKU', 'woocommerce-admin' ),
|
||||
'items_sold' => __( 'Items Sold', 'woocommerce-admin' ),
|
||||
'items_sold' => __( 'Items sold', 'woocommerce-admin' ),
|
||||
'net_revenue' => __( 'N. Revenue', 'woocommerce-admin' ),
|
||||
'orders_count' => __( 'Orders', 'woocommerce-admin' ),
|
||||
);
|
||||
|
|
|
@ -161,7 +161,7 @@ class Controller extends \WC_REST_Reports_Controller {
|
|||
'indicator' => true,
|
||||
),
|
||||
'net_revenue' => array(
|
||||
'description' => __( 'Net Sales.', 'woocommerce-admin' ),
|
||||
'description' => __( 'Net sales.', 'woocommerce-admin' ),
|
||||
'type' => 'number',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
|
|
|
@ -98,7 +98,7 @@ class NewSalesRecord {
|
|||
|
||||
$content = sprintf(
|
||||
/* translators: 1 and 4: Date (e.g. October 16th), 2 and 3: Amount (e.g. $160.00) */
|
||||
__( 'Woohoo, %1$s was your record day for sales! Net Sales was %2$s beating the previous record of %3$s set on %4$s.', 'woocommerce-admin' ),
|
||||
__( 'Woohoo, %1$s was your record day for sales! Net sales was %2$s beating the previous record of %3$s set on %4$s.', 'woocommerce-admin' ),
|
||||
$formatted_yesterday,
|
||||
$formatted_total,
|
||||
$formatted_record_amt,
|
||||
|
|
|
@ -274,9 +274,9 @@ class WC_Tests_Reports_Coupons extends WC_Unit_Test_Case {
|
|||
|
||||
// Test the CSV export.
|
||||
$expected_csv_columns = array(
|
||||
'"Coupon Code"',
|
||||
'"Coupon code"',
|
||||
'Orders',
|
||||
'"Amount Discounted"',
|
||||
'"Amount discounted"',
|
||||
'Created',
|
||||
'Expires',
|
||||
'Type',
|
||||
|
|
|
@ -475,7 +475,7 @@ class WC_Tests_Reports_Products extends WC_Unit_Test_Case {
|
|||
);
|
||||
|
||||
$expected_csv = chr( 239 ) . chr( 187 ) . chr( 191 );
|
||||
$expected_csv .= '"Product Title",SKU,"Items Sold","N. Revenue",Orders,Category,Variations,Status,Stock';
|
||||
$expected_csv .= '"Product title",SKU,"Items sold","N. Revenue",Orders,Category,Variations,Status,Stock';
|
||||
$expected_csv .= PHP_EOL;
|
||||
|
||||
$export = new ReportCSVExporter( 'products', $args );
|
||||
|
|
Loading…
Reference in New Issue