* 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:
David Levin 2021-08-13 11:54:24 -07:00 committed by GitHub
parent 78e49ab09e
commit c728cced1f
95 changed files with 351 additions and 347 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: Tweak
Change all analytics strings and labels to sentence case. #6501

View File

@ -53,7 +53,7 @@ exports[`Leaderboard should render correct data in the table 1`] = `
<span <span
aria-hidden="false" aria-hidden="false"
> >
Items Sold Items sold
</span> </span>
</th> </th>
<th <th
@ -75,7 +75,7 @@ exports[`Leaderboard should render correct data in the table 1`] = `
<span <span
aria-hidden="false" aria-hidden="false"
> >
Net Sales Net sales
</span> </span>
</th> </th>
</tr> </tr>

View File

@ -62,13 +62,13 @@ describe( 'Leaderboard', () => {
label: 'Name', label: 'Name',
}, },
{ {
label: 'Items Sold', label: 'Items sold',
}, },
{ {
label: 'Orders', label: 'Orders',
}, },
{ {
label: 'Net Sales', label: 'Net sales',
}, },
]; ];
const { container } = render( const { container } = render(

View File

@ -43,7 +43,7 @@ class ReportFilters extends Component {
const { report, addCesSurveyForAnalytics } = this.props; const { report, addCesSurveyForAnalytics } = this.props;
// This event gets triggered in the following cases. // 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. // 2. Select "Comparison" or any other filter types.
// The comparsion and other filter types require a user to click // 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 // a button to execute a query, so this is not a good place to

View File

@ -103,8 +103,8 @@ export class ReportSummary extends Component {
reverseTrend={ isReverseTrend } reverseTrend={ isReverseTrend }
prevLabel={ prevLabel={
compare === 'previous_period' compare === 'previous_period'
? __( 'Previous Period:', 'woocommerce-admin' ) ? __( 'Previous period:', 'woocommerce-admin' )
: __( 'Previous Year:', 'woocommerce-admin' ) : __( 'Previous year:', 'woocommerce-admin' )
} }
prevValue={ prevValue } prevValue={ prevValue }
selected={ isSelected } selected={ isSelected }

View File

@ -21,7 +21,7 @@ describe( 'ReportSummary', () => {
) { ) {
const selectedChart = { const selectedChart = {
key: 'total_sales', key: 'total_sales',
label: 'Total Sales', label: 'Total sales',
type, type,
}; };
const charts = [ selectedChart ]; const charts = [ selectedChart ];
@ -60,11 +60,11 @@ describe( 'ReportSummary', () => {
expect( delta ).toBeInTheDocument(); expect( delta ).toBeInTheDocument();
userEvent.hover( delta ); userEvent.hover( delta );
const tooltip = await screen.findByText( 'Previous Year: 500.25' ); const tooltip = await screen.findByText( 'Previous year: 500.25' );
expect( tooltip ).toBeInTheDocument(); expect( tooltip ).toBeInTheDocument();
userEvent.unhover( delta ); 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 () => { test( 'should format currency numbers properly', async () => {
@ -76,11 +76,11 @@ describe( 'ReportSummary', () => {
expect( delta ).toBeInTheDocument(); expect( delta ).toBeInTheDocument();
userEvent.hover( delta ); userEvent.hover( delta );
const tooltip = await screen.findByText( 'Previous Year: $500.25' ); const tooltip = await screen.findByText( 'Previous year: $500.25' );
expect( tooltip ).toBeInTheDocument(); expect( tooltip ).toBeInTheDocument();
userEvent.unhover( delta ); 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 () => { test( 'should format average numbers properly', async () => {
@ -92,11 +92,11 @@ describe( 'ReportSummary', () => {
expect( delta ).toBeInTheDocument(); expect( delta ).toBeInTheDocument();
userEvent.hover( delta ); userEvent.hover( delta );
const tooltip = await screen.findByText( 'Previous Year: 500' ); const tooltip = await screen.findByText( 'Previous year: 500' );
expect( tooltip ).toBeInTheDocument(); expect( tooltip ).toBeInTheDocument();
userEvent.unhover( delta ); 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 () => { test( 'should not break if secondary value is 0', async () => {
@ -108,11 +108,11 @@ describe( 'ReportSummary', () => {
expect( delta ).toBeInTheDocument(); expect( delta ).toBeInTheDocument();
userEvent.hover( delta ); userEvent.hover( delta );
const tooltip = await screen.findByText( 'Previous Year: 0' ); const tooltip = await screen.findByText( 'Previous year: 0' );
expect( tooltip ).toBeInTheDocument(); expect( tooltip ).toBeInTheDocument();
userEvent.unhover( delta ); 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 () => { test( 'should show 0s when displaying an empty search', async () => {
@ -120,7 +120,7 @@ describe( 'ReportSummary', () => {
expect( screen.getAllByText( 'N/A' ) ).not.toBeNull(); 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(); expect( delta ).toBeInTheDocument();
} ); } );

View File

@ -23,14 +23,14 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
export const charts = applyFilters( CATEGORY_REPORT_CHARTS_FILTER, [ export const charts = applyFilters( CATEGORY_REPORT_CHARTS_FILTER, [
{ {
key: 'items_sold', key: 'items_sold',
label: __( 'Items Sold', 'woocommerce-admin' ), label: __( 'Items sold', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'items_sold', orderby: 'items_sold',
type: 'number', type: 'number',
}, },
{ {
key: 'net_revenue', key: 'net_revenue',
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'net_revenue', orderby: 'net_revenue',
type: 'currency', type: 'currency',
@ -49,7 +49,7 @@ export const advancedFilters = applyFilters(
{ {
filters: {}, filters: {},
title: _x( 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', 'A sentence describing filters for Categories. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -58,11 +58,11 @@ export const advancedFilters = applyFilters(
const filterValues = [ const filterValues = [
{ {
label: __( 'All Categories', 'woocommerce-admin' ), label: __( 'All categories', 'woocommerce-admin' ),
value: 'all', value: 'all',
}, },
{ {
label: __( 'Single Category', 'woocommerce-admin' ), label: __( 'Single category', 'woocommerce-admin' ),
value: 'select_category', value: 'select_category',
chartMode: 'item-comparison', chartMode: 'item-comparison',
subFilters: [ subFilters: [
@ -113,7 +113,7 @@ const filterValues = [
if ( Object.keys( advancedFilters.filters ).length ) { if ( Object.keys( advancedFilters.filters ).length ) {
filterValues.push( { filterValues.push( {
label: __( 'Advanced Filters', 'woocommerce-admin' ), label: __( 'Advanced filters', 'woocommerce-admin' ),
value: 'advanced', value: 'advanced',
} ); } );
} }

View File

@ -36,7 +36,7 @@ class CategoriesReportTable extends Component {
isLeftAligned: true, isLeftAligned: true,
}, },
{ {
label: __( 'Items Sold', 'woocommerce-admin' ), label: __( 'Items sold', 'woocommerce-admin' ),
key: 'items_sold', key: 'items_sold',
required: true, required: true,
defaultSort: true, defaultSort: true,
@ -44,7 +44,7 @@ class CategoriesReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
key: 'net_revenue', key: 'net_revenue',
isSortable: true, isSortable: true,
isNumeric: true, isNumeric: true,
@ -140,8 +140,8 @@ class CategoriesReportTable extends Component {
return [ return [
{ {
label: _n( label: _n(
'category', 'Category',
'categories', 'Categories',
totalResults, totalResults,
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -149,21 +149,21 @@ class CategoriesReportTable extends Component {
}, },
{ {
label: _n( label: _n(
'item sold', 'Item sold',
'items sold', 'Items sold',
itemsSold, itemsSold,
'woocommerce-admin' 'woocommerce-admin'
), ),
value: formatValue( currency, 'number', itemsSold ), value: formatValue( currency, 'number', itemsSold ),
}, },
{ {
label: __( 'net sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
value: formatAmount( netRevenue ), value: formatAmount( netRevenue ),
}, },
{ {
label: _n( label: _n(
'order', 'Order',
'orders', 'Orders',
ordersCount, ordersCount,
'woocommerce-admin' 'woocommerce-admin'
), ),

View File

@ -21,7 +21,7 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
export const charts = applyFilters( COUPON_REPORT_CHARTS_FILTER, [ export const charts = applyFilters( COUPON_REPORT_CHARTS_FILTER, [
{ {
key: 'orders_count', key: 'orders_count',
label: __( 'Discounted Orders', 'woocommerce-admin' ), label: __( 'Discounted orders', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'orders_count', orderby: 'orders_count',
type: 'number', type: 'number',
@ -40,7 +40,7 @@ export const advancedFilters = applyFilters(
{ {
filters: {}, filters: {},
title: _x( 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', 'A sentence describing filters for Coupons. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -48,9 +48,9 @@ export const advancedFilters = applyFilters(
); );
const filterValues = [ 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', value: 'select_coupon',
chartMode: 'item-comparison', chartMode: 'item-comparison',
subFilters: [ subFilters: [
@ -96,7 +96,7 @@ const filterValues = [
if ( Object.keys( advancedFilters.filters ).length ) { if ( Object.keys( advancedFilters.filters ).length ) {
filterValues.push( { filterValues.push( {
label: __( 'Advanced Filters', 'woocommerce-admin' ), label: __( 'Advanced filters', 'woocommerce-admin' ),
value: 'advanced', value: 'advanced',
} ); } );
} }

View File

@ -28,7 +28,7 @@ class CouponsReportTable extends Component {
getHeadersContent() { getHeadersContent() {
return [ return [
{ {
label: __( 'Coupon Code', 'woocommerce-admin' ), label: __( 'Coupon code', 'woocommerce-admin' ),
key: 'code', key: 'code',
required: true, required: true,
isLeftAligned: true, isLeftAligned: true,
@ -43,7 +43,7 @@ class CouponsReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Amount Discounted', 'woocommerce-admin' ), label: __( 'Amount discounted', 'woocommerce-admin' ),
key: 'amount', key: 'amount',
isSortable: true, isSortable: true,
isNumeric: true, isNumeric: true,
@ -178,8 +178,8 @@ class CouponsReportTable extends Component {
return [ return [
{ {
label: _n( label: _n(
'coupon', 'Coupon',
'coupons', 'Coupons',
couponsCount, couponsCount,
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -187,15 +187,15 @@ class CouponsReportTable extends Component {
}, },
{ {
label: _n( label: _n(
'order', 'Order',
'orders', 'Orders',
ordersCount, ordersCount,
'woocommerce-admin' 'woocommerce-admin'
), ),
value: formatValue( currency, 'number', ordersCount ), value: formatValue( currency, 'number', ordersCount ),
}, },
{ {
label: __( 'amount discounted', 'woocommerce-admin' ), label: __( 'Amount discounted', 'woocommerce-admin' ),
value: formatAmount( amount ), value: formatAmount( amount ),
}, },
]; ];

View File

@ -59,7 +59,7 @@ export const filters = applyFilters( CUSTOMERS_REPORT_FILTERS_FILTER, [
], ],
}, },
{ {
label: __( 'Advanced Filters', 'woocommerce-admin' ), label: __( 'Advanced filters', 'woocommerce-admin' ),
value: 'advanced', value: 'advanced',
}, },
], ],
@ -71,7 +71,7 @@ export const advancedFilters = applyFilters(
CUSTOMERS_REPORT_ADVANCED_FILTERS_FILTER, CUSTOMERS_REPORT_ADVANCED_FILTERS_FILTER,
{ {
title: _x( 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', 'A sentence describing filters for Customers. See screen shot for context: https://cloudup.com/cCsm3GeXJbE',
'woocommerce-admin' 'woocommerce-admin'
), ),

View File

@ -41,13 +41,13 @@ class CustomersReportTable extends Component {
hiddenByDefault: true, hiddenByDefault: true,
}, },
{ {
label: __( 'Last Active', 'woocommerce-admin' ), label: __( 'Last active', 'woocommerce-admin' ),
key: 'date_last_active', key: 'date_last_active',
defaultSort: true, defaultSort: true,
isSortable: true, isSortable: true,
}, },
{ {
label: __( 'Date Registered', 'woocommerce-admin' ), label: __( 'Date registered', 'woocommerce-admin' ),
key: 'date_registered', key: 'date_registered',
isSortable: true, isSortable: true,
}, },
@ -62,7 +62,7 @@ class CustomersReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Total Spend', 'woocommerce-admin' ), label: __( 'Total spend', 'woocommerce-admin' ),
key: 'total_spend', key: 'total_spend',
isSortable: true, isSortable: true,
isNumeric: true, isNumeric: true,
@ -70,7 +70,7 @@ class CustomersReportTable extends Component {
{ {
label: __( 'AOV', 'woocommerce-admin' ), label: __( 'AOV', 'woocommerce-admin' ),
screenReaderLabel: __( screenReaderLabel: __(
'Average Order Value', 'Average order value',
'woocommerce-admin' 'woocommerce-admin'
), ),
key: 'avg_order_value', key: 'avg_order_value',
@ -94,7 +94,7 @@ class CustomersReportTable extends Component {
isSortable: true, isSortable: true,
}, },
{ {
label: __( 'Postal Code', 'woocommerce-admin' ), label: __( 'Postal code', 'woocommerce-admin' ),
key: 'postcode', key: 'postcode',
hiddenByDefault: true, hiddenByDefault: true,
isSortable: true, isSortable: true,
@ -244,19 +244,19 @@ class CustomersReportTable extends Component {
}, },
{ {
label: _n( label: _n(
'average order', 'Average order',
'average orders', 'Average orders',
avgOrdersCount, avgOrdersCount,
'woocommerce-admin' 'woocommerce-admin'
), ),
value: formatValue( currency, 'number', avgOrdersCount ), value: formatValue( currency, 'number', avgOrdersCount ),
}, },
{ {
label: __( 'average lifetime spend', 'woocommerce-admin' ), label: __( 'Average lifetime spend', 'woocommerce-admin' ),
value: formatAmount( avgTotalSpend ), value: formatAmount( avgTotalSpend ),
}, },
{ {
label: __( 'average order value', 'woocommerce-admin' ), label: __( 'Average order value', 'woocommerce-admin' ),
value: formatAmount( avgAvgOrderValue ), value: formatAmount( avgAvgOrderValue ),
}, },
]; ];

View File

@ -34,9 +34,9 @@ export const filters = applyFilters( DOWLOADS_REPORT_FILTERS_FILTER, [
param: 'filter', param: 'filter',
showFilters: () => true, showFilters: () => true,
filters: [ 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', value: 'advanced',
}, },
], ],
@ -48,7 +48,7 @@ export const advancedFilters = applyFilters(
DOWLOADS_REPORT_ADVANCED_FILTERS_FILTER, DOWLOADS_REPORT_ADVANCED_FILTERS_FILTER,
{ {
title: _x( 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', 'A sentence describing filters for Downloads. See screen shot for context: https://cloudup.com/ccxhyH2mEDg',
'woocommerce-admin' 'woocommerce-admin'
), ),

View File

@ -39,13 +39,13 @@ class DownloadsReportTable extends Component {
isSortable: true, isSortable: true,
}, },
{ {
label: __( 'Product Title', 'woocommerce-admin' ), label: __( 'Product title', 'woocommerce-admin' ),
key: 'product', key: 'product',
isSortable: true, isSortable: true,
required: true, required: true,
}, },
{ {
label: __( 'File Name', 'woocommerce-admin' ), label: __( 'File name', 'woocommerce-admin' ),
key: 'file_name', key: 'file_name',
}, },
{ {
@ -170,8 +170,8 @@ class DownloadsReportTable extends Component {
}, },
{ {
label: _n( label: _n(
'download', 'Download',
'downloads', 'Downloads',
downloadCount, downloadCount,
'woocommerce-admin' 'woocommerce-admin'
), ),

View File

@ -95,7 +95,7 @@ export default compose(
const report = getReportParam( props ); const report = getReportParam( props );
const searchWords = getSearchWords( query ); 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 = const mappedReport =
report === 'categories' && query.filter === 'single_category' report === 'categories' && query.filter === 'single_category'
? 'products' ? 'products'

View File

@ -28,19 +28,19 @@ export const charts = applyFilters( ORDERS_REPORT_CHARTS_FILTER, [
}, },
{ {
key: 'net_revenue', key: 'net_revenue',
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'net_total', orderby: 'net_total',
type: 'currency', type: 'currency',
}, },
{ {
key: 'avg_order_value', key: 'avg_order_value',
label: __( 'Average Order Value', 'woocommerce-admin' ), label: __( 'Average order value', 'woocommerce-admin' ),
type: 'currency', type: 'currency',
}, },
{ {
key: 'avg_items_per_order', key: 'avg_items_per_order',
label: __( 'Average Items Per Order', 'woocommerce-admin' ), label: __( 'Average items per order', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'num_items_sold', orderby: 'num_items_sold',
type: 'average', type: 'average',
@ -54,9 +54,9 @@ export const filters = applyFilters( ORDERS_REPORT_FILTERS_FILTER, [
param: 'filter', param: 'filter',
showFilters: () => true, showFilters: () => true,
filters: [ 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', value: 'advanced',
}, },
], ],
@ -68,7 +68,7 @@ export const advancedFilters = applyFilters(
ORDERS_REPORT_ADVANCED_FILTERS_FILTER, ORDERS_REPORT_ADVANCED_FILTERS_FILTER,
{ {
title: _x( 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', 'A sentence describing filters for Orders. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
'woocommerce-admin' '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 */ /* translators: A sentence describing a Coupon filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
title: __( title: __(
'{{title}}Coupon Code{{/title}} {{rule /}} {{filter /}}', '{{title}}Coupon code{{/title}} {{rule /}} {{filter /}}',
'woocommerce-admin' 'woocommerce-admin'
), ),
filter: __( 'Select coupon codes', 'woocommerce-admin' ), filter: __( 'Select coupon codes', 'woocommerce-admin' ),
@ -246,7 +246,7 @@ export const advancedFilters = applyFilters(
}, },
customer_type: { customer_type: {
labels: { labels: {
add: __( 'Customer Type', 'woocommerce-admin' ), add: __( 'Customer type', 'woocommerce-admin' ),
remove: __( 'Remove customer filter', 'woocommerce-admin' ), remove: __( 'Remove customer filter', 'woocommerce-admin' ),
rule: __( rule: __(
'Select a customer filter match', 'Select a customer filter match',

View File

@ -58,7 +58,7 @@ class OrdersReportTable extends Component {
isSortable: false, isSortable: false,
}, },
{ {
label: __( 'Customer Type', 'woocommerce-admin' ), label: __( 'Customer type', 'woocommerce-admin' ),
key: 'customer_type', key: 'customer_type',
required: false, required: false,
isSortable: false, isSortable: false,
@ -71,7 +71,7 @@ class OrdersReportTable extends Component {
isSortable: false, isSortable: false,
}, },
{ {
label: __( 'Items Sold', 'woocommerce-admin' ), label: __( 'Items sold', 'woocommerce-admin' ),
key: 'num_items_sold', key: 'num_items_sold',
required: false, required: false,
isSortable: true, isSortable: true,
@ -85,8 +85,8 @@ class OrdersReportTable extends Component {
isSortable: false, isSortable: false,
}, },
{ {
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
screenReaderLabel: __( 'Net Sales', 'woocommerce-admin' ), screenReaderLabel: __( 'Net sales', 'woocommerce-admin' ),
key: 'net_total', key: 'net_total',
required: true, required: true,
isSortable: true, isSortable: true,
@ -254,8 +254,8 @@ class OrdersReportTable extends Component {
return [ return [
{ {
label: _n( label: _n(
'order', 'Order',
'orders', 'Orders',
ordersCount, ordersCount,
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -263,8 +263,8 @@ class OrdersReportTable extends Component {
}, },
{ {
label: _n( label: _n(
' customer', ' Customer',
' customers', ' Customers',
totalCustomers, totalCustomers,
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -272,8 +272,8 @@ class OrdersReportTable extends Component {
}, },
{ {
label: _n( label: _n(
'product', 'Product',
'products', 'Products',
products, products,
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -281,8 +281,8 @@ class OrdersReportTable extends Component {
}, },
{ {
label: _n( label: _n(
'item sold', 'Item sold',
'items sold', 'Items sold',
numItemsSold, numItemsSold,
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -290,8 +290,8 @@ class OrdersReportTable extends Component {
}, },
{ {
label: _n( label: _n(
'coupon', 'Coupon',
'coupons', 'Coupons',
couponsCount, couponsCount,
'woocommerce-admin' 'woocommerce-admin'
), ),

View File

@ -26,14 +26,14 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
export const charts = applyFilters( PRODUCTS_REPORT_CHARTS_FILTER, [ export const charts = applyFilters( PRODUCTS_REPORT_CHARTS_FILTER, [
{ {
key: 'items_sold', key: 'items_sold',
label: __( 'Items Sold', 'woocommerce-admin' ), label: __( 'Items sold', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'items_sold', orderby: 'items_sold',
type: 'number', type: 'number',
}, },
{ {
key: 'net_revenue', key: 'net_revenue',
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'net_revenue', orderby: 'net_revenue',
type: 'currency', type: 'currency',
@ -53,9 +53,9 @@ const filterConfig = {
param: 'filter', param: 'filter',
showFilters: () => true, showFilters: () => true,
filters: [ 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', value: 'select_product',
chartMode: 'item-comparison', chartMode: 'item-comparison',
subFilters: [ subFilters: [
@ -73,7 +73,7 @@ const filterConfig = {
'Type to search for a product', 'Type to search for a product',
'woocommerce-admin' 'woocommerce-admin'
), ),
button: __( 'Single Product', 'woocommerce-admin' ), button: __( 'Single product', 'woocommerce-admin' ),
}, },
}, },
}, },
@ -114,12 +114,12 @@ const variationsConfig = {
param: 'filter-variations', param: 'filter-variations',
filters: [ filters: [
{ {
label: __( 'All Variations', 'woocommerce-admin' ), label: __( 'All variations', 'woocommerce-admin' ),
chartMode: 'item-comparison', chartMode: 'item-comparison',
value: 'all', value: 'all',
}, },
{ {
label: __( 'Single Variation', 'woocommerce-admin' ), label: __( 'Single variation', 'woocommerce-admin' ),
value: 'select_variation', value: 'select_variation',
subFilters: [ subFilters: [
{ {
@ -136,7 +136,7 @@ const variationsConfig = {
'woocommerce-admin' 'woocommerce-admin'
), ),
button: __( button: __(
'Single Variation', 'Single variation',
'woocommerce-admin' 'woocommerce-admin'
), ),
}, },

View File

@ -37,7 +37,7 @@ class ProductsReportTable extends Component {
getHeadersContent() { getHeadersContent() {
return [ return [
{ {
label: __( 'Product Title', 'woocommerce-admin' ), label: __( 'Product title', 'woocommerce-admin' ),
key: 'product_name', key: 'product_name',
required: true, required: true,
isLeftAligned: true, isLeftAligned: true,
@ -50,7 +50,7 @@ class ProductsReportTable extends Component {
isSortable: true, isSortable: true,
}, },
{ {
label: __( 'Items Sold', 'woocommerce-admin' ), label: __( 'Items sold', 'woocommerce-admin' ),
key: 'items_sold', key: 'items_sold',
required: true, required: true,
defaultSort: true, defaultSort: true,
@ -58,8 +58,8 @@ class ProductsReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
screenReaderLabel: __( 'Net Sales', 'woocommerce-admin' ), screenReaderLabel: __( 'Net sales', 'woocommerce-admin' ),
key: 'net_revenue', key: 'net_revenue',
required: true, required: true,
isSortable: true, isSortable: true,
@ -284,8 +284,8 @@ class ProductsReportTable extends Component {
return [ return [
{ {
label: _n( label: _n(
'product', 'Product',
'products', 'Products',
productsCount, productsCount,
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -293,21 +293,21 @@ class ProductsReportTable extends Component {
}, },
{ {
label: _n( label: _n(
'item sold', 'Item sold',
'items sold', 'Items sold',
itemsSold, itemsSold,
'woocommerce-admin' 'woocommerce-admin'
), ),
value: formatValue( currency, 'number', itemsSold ), value: formatValue( currency, 'number', itemsSold ),
}, },
{ {
label: __( 'net sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
value: formatAmount( netRevenue ), value: formatAmount( netRevenue ),
}, },
{ {
label: _n( label: _n(
'orders', 'Orders',
'orders', 'Orders',
ordersCount, ordersCount,
'woocommerce-admin' 'woocommerce-admin'
), ),

View File

@ -13,7 +13,7 @@ const REVENUE_REPORT_ADVANCED_FILTERS_FILTER =
export const charts = applyFilters( REVENUE_REPORT_CHARTS_FILTER, [ export const charts = applyFilters( REVENUE_REPORT_CHARTS_FILTER, [
{ {
key: 'gross_sales', key: 'gross_sales',
label: __( 'Gross Sales', 'woocommerce-admin' ), label: __( 'Gross sales', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'gross_sales', orderby: 'gross_sales',
type: 'currency', type: 'currency',
@ -37,7 +37,7 @@ export const charts = applyFilters( REVENUE_REPORT_CHARTS_FILTER, [
}, },
{ {
key: 'net_revenue', key: 'net_revenue',
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
orderby: 'net_revenue', orderby: 'net_revenue',
type: 'currency', type: 'currency',
isReverseTrend: false, isReverseTrend: false,
@ -59,7 +59,7 @@ export const charts = applyFilters( REVENUE_REPORT_CHARTS_FILTER, [
}, },
{ {
key: 'total_sales', key: 'total_sales',
label: __( 'Total Sales', 'woocommerce-admin' ), label: __( 'Total sales', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'total_sales', orderby: 'total_sales',
type: 'currency', type: 'currency',

View File

@ -69,7 +69,7 @@ class RevenueReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Gross Sales', 'woocommerce-admin' ), label: __( 'Gross sales', 'woocommerce-admin' ),
key: 'gross_sales', key: 'gross_sales',
required: false, required: false,
isSortable: true, isSortable: true,
@ -90,7 +90,7 @@ class RevenueReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
key: 'net_revenue', key: 'net_revenue',
required: false, required: false,
isSortable: true, isSortable: true,
@ -111,7 +111,7 @@ class RevenueReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Total Sales', 'woocommerce-admin' ), label: __( 'Total sales', 'woocommerce-admin' ),
key: 'total_sales', key: 'total_sales',
required: false, required: false,
isSortable: true, isSortable: true,
@ -232,31 +232,31 @@ class RevenueReportTable extends Component {
value: formatValue( currency, 'number', ordersCount ), value: formatValue( currency, 'number', ordersCount ),
}, },
{ {
label: __( 'gross sales', 'woocommerce-admin' ), label: __( 'Gross sales', 'woocommerce-admin' ),
value: formatAmount( grossSales ), value: formatAmount( grossSales ),
}, },
{ {
label: __( 'returns', 'woocommerce-admin' ), label: __( 'Returns', 'woocommerce-admin' ),
value: formatAmount( refunds ), value: formatAmount( refunds ),
}, },
{ {
label: __( 'coupons', 'woocommerce-admin' ), label: __( 'Coupons', 'woocommerce-admin' ),
value: formatAmount( coupons ), value: formatAmount( coupons ),
}, },
{ {
label: __( 'net sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
value: formatAmount( netRevenue ), value: formatAmount( netRevenue ),
}, },
{ {
label: __( 'taxes', 'woocommerce-admin' ), label: __( 'Taxes', 'woocommerce-admin' ),
value: formatAmount( taxes ), value: formatAmount( taxes ),
}, },
{ {
label: __( 'shipping', 'woocommerce-admin' ), label: __( 'Shipping', 'woocommerce-admin' ),
value: formatAmount( shipping ), value: formatAmount( shipping ),
}, },
{ {
label: __( 'total sales', 'woocommerce-admin' ), label: __( 'Total sales', 'woocommerce-admin' ),
value: formatAmount( totalSales ), value: formatAmount( totalSales ),
}, },
]; ];

View File

@ -29,18 +29,18 @@ export const filters = applyFilters( STOCK_REPORT_FILTERS_FILTER, [
param: 'type', param: 'type',
showFilters: () => true, showFilters: () => true,
filters: [ 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', value: 'outofstock',
}, },
{ {
label: __( 'Low Stock', 'woocommerce-admin' ), label: __( 'Low stock', 'woocommerce-admin' ),
value: 'lowstock', 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', value: 'onbackorder',
}, },
], ],

View File

@ -147,27 +147,27 @@ class StockReportTable extends Component {
return [ return [
{ {
label: _n( label: _n(
'product', 'Product',
'products', 'Products',
products, products,
'woocommerce-admin' 'woocommerce-admin'
), ),
value: formatValue( currency, 'number', products ), value: formatValue( currency, 'number', products ),
}, },
{ {
label: __( 'out of stock', 'woocommerce-admin' ), label: __( 'Out of stock', 'woocommerce-admin' ),
value: formatValue( currency, 'number', outofstock ), value: formatValue( currency, 'number', outofstock ),
}, },
{ {
label: __( 'low stock', 'woocommerce-admin' ), label: __( 'Low stock', 'woocommerce-admin' ),
value: formatValue( currency, 'number', lowstock ), value: formatValue( currency, 'number', lowstock ),
}, },
{ {
label: __( 'on backorder', 'woocommerce-admin' ), label: __( 'On backorder', 'woocommerce-admin' ),
value: formatValue( currency, 'number', onbackorder ), value: formatValue( currency, 'number', onbackorder ),
}, },
{ {
label: __( 'in stock', 'woocommerce-admin' ), label: __( 'In stock', 'woocommerce-admin' ),
value: formatValue( currency, 'number', instock ), value: formatValue( currency, 'number', instock ),
}, },
]; ];

View File

@ -23,21 +23,21 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
export const charts = applyFilters( TAXES_REPORT_CHARTS_FILTER, [ export const charts = applyFilters( TAXES_REPORT_CHARTS_FILTER, [
{ {
key: 'total_tax', key: 'total_tax',
label: __( 'Total Tax', 'woocommerce-admin' ), label: __( 'Total tax', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'total_tax', orderby: 'total_tax',
type: 'currency', type: 'currency',
}, },
{ {
key: 'order_tax', key: 'order_tax',
label: __( 'Order Tax', 'woocommerce-admin' ), label: __( 'Order tax', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'order_tax', orderby: 'order_tax',
type: 'currency', type: 'currency',
}, },
{ {
key: 'shipping_tax', key: 'shipping_tax',
label: __( 'Shipping Tax', 'woocommerce-admin' ), label: __( 'Shipping tax', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'shipping_tax', orderby: 'shipping_tax',
type: 'currency', type: 'currency',
@ -56,7 +56,7 @@ export const advancedFilters = applyFilters(
{ {
filters: {}, filters: {},
title: _x( 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', 'A sentence describing filters for Taxes. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
'woocommerce-admin' 'woocommerce-admin'
), ),
@ -64,7 +64,7 @@ export const advancedFilters = applyFilters(
); );
const filterValues = [ const filterValues = [
{ label: __( 'All Taxes', 'woocommerce-admin' ), value: 'all' }, { label: __( 'All taxes', 'woocommerce-admin' ), value: 'all' },
{ {
label: __( 'Comparison', 'woocommerce-admin' ), label: __( 'Comparison', 'woocommerce-admin' ),
value: 'compare-taxes', value: 'compare-taxes',
@ -99,7 +99,7 @@ const filterValues = [
if ( Object.keys( advancedFilters.filters ).length ) { if ( Object.keys( advancedFilters.filters ).length ) {
filterValues.push( { filterValues.push( {
label: __( 'Advanced Filters', 'woocommerce-admin' ), label: __( 'Advanced filters', 'woocommerce-admin' ),
value: 'advanced', value: 'advanced',
} ); } );
} }

View File

@ -27,7 +27,7 @@ class TaxesReportTable extends Component {
getHeadersContent() { getHeadersContent() {
return [ return [
{ {
label: __( 'Tax Code', 'woocommerce-admin' ), label: __( 'Tax code', 'woocommerce-admin' ),
key: 'tax_code', key: 'tax_code',
required: true, required: true,
isLeftAligned: true, isLeftAligned: true,
@ -40,17 +40,17 @@ class TaxesReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Total Tax', 'woocommerce-admin' ), label: __( 'Total tax', 'woocommerce-admin' ),
key: 'total_tax', key: 'total_tax',
isSortable: true, isSortable: true,
}, },
{ {
label: __( 'Order Tax', 'woocommerce-admin' ), label: __( 'Order tax', 'woocommerce-admin' ),
key: 'order_tax', key: 'order_tax',
isSortable: true, isSortable: true,
}, },
{ {
label: __( 'Shipping Tax', 'woocommerce-admin' ), label: __( 'Shipping tax', 'woocommerce-admin' ),
key: 'shipping_tax', key: 'shipping_tax',
isSortable: true, isSortable: true,
}, },

View File

@ -27,14 +27,14 @@ const { addCesSurveyForAnalytics } = dispatch( CES_STORE_KEY );
export const charts = applyFilters( VARIATIONS_REPORT_CHARTS_FILTER, [ export const charts = applyFilters( VARIATIONS_REPORT_CHARTS_FILTER, [
{ {
key: 'items_sold', key: 'items_sold',
label: __( 'Items Sold', 'woocommerce-admin' ), label: __( 'Items sold', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'items_sold', orderby: 'items_sold',
type: 'number', type: 'number',
}, },
{ {
key: 'net_revenue', key: 'net_revenue',
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
order: 'desc', order: 'desc',
orderby: 'net_revenue', orderby: 'net_revenue',
type: 'currency', type: 'currency',
@ -56,12 +56,12 @@ export const filters = applyFilters( VARIATIONS_REPORT_FILTERS_FILTER, [
showFilters: () => true, showFilters: () => true,
filters: [ filters: [
{ {
label: __( 'All Variations', 'woocommerce-admin' ), label: __( 'All variations', 'woocommerce-admin' ),
chartMode: 'item-comparison', chartMode: 'item-comparison',
value: 'all', value: 'all',
}, },
{ {
label: __( 'Single Variation', 'woocommerce-admin' ), label: __( 'Single variation', 'woocommerce-admin' ),
value: 'select_variation', value: 'select_variation',
subFilters: [ subFilters: [
{ {
@ -78,7 +78,7 @@ export const filters = applyFilters( VARIATIONS_REPORT_FILTERS_FILTER, [
'woocommerce-admin' 'woocommerce-admin'
), ),
button: __( button: __(
'Single Variation', 'Single variation',
'woocommerce-admin' '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', value: 'advanced',
}, },
], ],
@ -121,7 +121,7 @@ export const advancedFilters = applyFilters(
VARIATIONS_REPORT_ADVANCED_FILTERS_FILTER, VARIATIONS_REPORT_ADVANCED_FILTERS_FILTER,
{ {
title: _x( 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', 'A sentence describing filters for Variations. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ',
'woocommerce-admin' 'woocommerce-admin'
), ),

View File

@ -35,7 +35,7 @@ class VariationsReportTable extends Component {
getHeadersContent() { getHeadersContent() {
return [ return [
{ {
label: __( 'Product / Variation Title', 'woocommerce-admin' ), label: __( 'Product / Variation title', 'woocommerce-admin' ),
key: 'name', key: 'name',
required: true, required: true,
isLeftAligned: true, isLeftAligned: true,
@ -47,7 +47,7 @@ class VariationsReportTable extends Component {
isSortable: true, isSortable: true,
}, },
{ {
label: __( 'Items Sold', 'woocommerce-admin' ), label: __( 'Items sold', 'woocommerce-admin' ),
key: 'items_sold', key: 'items_sold',
required: true, required: true,
defaultSort: true, defaultSort: true,
@ -55,8 +55,8 @@ class VariationsReportTable extends Component {
isNumeric: true, isNumeric: true,
}, },
{ {
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
screenReaderLabel: __( 'Net Sales', 'woocommerce-admin' ), screenReaderLabel: __( 'Net sales', 'woocommerce-admin' ),
key: 'net_revenue', key: 'net_revenue',
required: true, required: true,
isSortable: true, isSortable: true,

View File

@ -74,7 +74,7 @@ const orderStatusOptions = [
export const config = applyFilters( SETTINGS_FILTER, { export const config = applyFilters( SETTINGS_FILTER, {
woocommerce_excluded_report_order_statuses: { woocommerce_excluded_report_order_statuses: {
label: __( 'Excluded Statuses:', 'woocommerce-admin' ), label: __( 'Excluded statuses:', 'woocommerce-admin' ),
inputType: 'checkboxGroup', inputType: 'checkboxGroup',
options: orderStatusOptions, options: orderStatusOptions,
helpText: interpolateComponents( { helpText: interpolateComponents( {
@ -90,7 +90,7 @@ export const config = applyFilters( SETTINGS_FILTER, {
defaultValue: [ 'pending', 'cancelled', 'failed' ], defaultValue: [ 'pending', 'cancelled', 'failed' ],
}, },
woocommerce_actionable_order_statuses: { woocommerce_actionable_order_statuses: {
label: __( 'Actionable Statuses:', 'woocommerce-admin' ), label: __( 'Actionable statuses:', 'woocommerce-admin' ),
inputType: 'checkboxGroup', inputType: 'checkboxGroup',
options: orderStatusOptions, options: orderStatusOptions,
helpText: __( helpText: __(
@ -102,7 +102,7 @@ export const config = applyFilters( SETTINGS_FILTER, {
}, },
woocommerce_default_date_range: { woocommerce_default_date_range: {
name: 'woocommerce_default_date_range', name: 'woocommerce_default_date_range',
label: __( 'Default Date Range:', 'woocommerce-admin' ), label: __( 'Default date range:', 'woocommerce-admin' ),
inputType: 'component', inputType: 'component',
component: DefaultDate, component: DefaultDate,
helpText: __( helpText: __(

View File

@ -42,7 +42,7 @@ class HistoricalDataLayout extends Component {
<Fragment> <Fragment>
<SectionHeader <SectionHeader
title={ __( title={ __(
'Import Historical Data', 'Import historical data',
'woocommerce-admin' 'woocommerce-admin'
) } ) }
/> />

View File

@ -66,7 +66,7 @@ function HistoricalDataPeriodSelector( {
<div className="woocommerce-settings-historical-data__column"> <div className="woocommerce-settings-historical-data__column">
<SelectControl <SelectControl
label={ __( label={ __(
'Import Historical Data', 'Import historical data',
'woocommerce-admin' 'woocommerce-admin'
) } ) }
value={ value.label } value={ value.label }

View File

@ -130,7 +130,7 @@ const Settings = ( { createNotice, query } ) => {
return ( return (
<Fragment> <Fragment>
<SectionHeader <SectionHeader
title={ __( 'Analytics Settings', 'woocommerce-admin' ) } title={ __( 'Analytics settings', 'woocommerce-admin' ) }
/> />
<div className="woocommerce-settings__wrapper"> <div className="woocommerce-settings__wrapper">
{ Object.keys( config ).map( ( setting ) => ( { Object.keys( config ).map( ( setting ) => (
@ -144,14 +144,14 @@ const Settings = ( { createNotice, query } ) => {
) ) } ) ) }
<div className="woocommerce-settings__actions"> <div className="woocommerce-settings__actions">
<Button isSecondary onClick={ resetDefaults }> <Button isSecondary onClick={ resetDefaults }>
{ __( 'Reset Defaults', 'woocommerce-admin' ) } { __( 'Reset defaults', 'woocommerce-admin' ) }
</Button> </Button>
<Button <Button
isPrimary isPrimary
isBusy={ isRequesting } isBusy={ isRequesting }
onClick={ saveChanges } onClick={ saveChanges }
> >
{ __( 'Save Settings', 'woocommerce-admin' ) } { __( 'Save settings', 'woocommerce-admin' ) }
</Button> </Button>
</div> </div>
</div> </div>

View File

@ -27,12 +27,12 @@ const charts = {
const defaultCharts = [ const defaultCharts = [
{ {
label: __( 'Total Sales', 'woocommerce-admin' ), label: __( 'Total sales', 'woocommerce-admin' ),
report: 'revenue', report: 'revenue',
key: 'total_sales', key: 'total_sales',
}, },
{ {
label: __( 'Net Sales', 'woocommerce-admin' ), label: __( 'Net sales', 'woocommerce-admin' ),
report: 'revenue', report: 'revenue',
key: 'net_revenue', key: 'net_revenue',
}, },
@ -42,12 +42,12 @@ const defaultCharts = [
key: 'orders_count', key: 'orders_count',
}, },
{ {
label: __( 'Average Order Value', 'woocommerce-admin' ), label: __( 'Average order value', 'woocommerce-admin' ),
report: 'orders', report: 'orders',
key: 'avg_order_value', key: 'avg_order_value',
}, },
{ {
label: __( 'Items Sold', 'woocommerce-admin' ), label: __( 'Items sold', 'woocommerce-admin' ),
report: 'products', report: 'products',
key: 'items_sold', key: 'items_sold',
}, },
@ -57,7 +57,7 @@ const defaultCharts = [
key: 'refunds', key: 'refunds',
}, },
{ {
label: __( 'Discounted Orders', 'woocommerce-admin' ), label: __( 'Discounted orders', 'woocommerce-admin' ),
report: 'coupons', report: 'coupons',
key: 'orders_count', key: 'orders_count',
}, },
@ -67,17 +67,17 @@ const defaultCharts = [
key: 'amount', key: 'amount',
}, },
{ {
label: __( 'Total Tax', 'woocommerce-admin' ), label: __( 'Total tax', 'woocommerce-admin' ),
report: 'taxes', report: 'taxes',
key: 'total_tax', key: 'total_tax',
}, },
{ {
label: __( 'Order Tax', 'woocommerce-admin' ), label: __( 'Order tax', 'woocommerce-admin' ),
report: 'taxes', report: 'taxes',
key: 'order_tax', key: 'order_tax',
}, },
{ {
label: __( 'Shipping Tax', 'woocommerce-admin' ), label: __( 'Shipping tax', 'woocommerce-admin' ),
report: 'taxes', report: 'taxes',
key: 'shipping_tax', key: 'shipping_tax',
}, },

View File

@ -124,7 +124,7 @@ const Leaderboards = ( props ) => {
} ) } } ) }
<SelectControl <SelectControl
className="woocommerce-dashboard__dashboard-leaderboards__select" className="woocommerce-dashboard__dashboard-leaderboards__select"
label={ __( 'Rows Per Table', 'woocommerce-admin' ) } label={ __( 'Rows per table', 'woocommerce-admin' ) }
value={ rowsPerTable } value={ rowsPerTable }
options={ Array.from( { length: 20 }, ( v, key ) => ( { options={ Array.from( { length: 20 }, ( v, key ) => ( {
v: key + 1, v: key + 1,

View File

@ -44,7 +44,7 @@ class SectionControls extends Component {
<Fragment> <Fragment>
<div className="woocommerce-ellipsis-menu__item"> <div className="woocommerce-ellipsis-menu__item">
<TextControl <TextControl
label={ __( 'Section Title', 'woocommerce-admin' ) } label={ __( 'Section title', 'woocommerce-admin' ) }
onBlur={ onTitleBlur } onBlur={ onTitleBlur }
onChange={ onTitleChange } onChange={ onTitleChange }
required required

View File

@ -55,7 +55,7 @@ class StorePerformance extends Component {
renderContent={ ( { onToggle } ) => ( renderContent={ ( { onToggle } ) => (
<Fragment> <Fragment>
<MenuTitle> <MenuTitle>
{ __( 'Display Stats:', 'woocommerce-admin' ) } { __( 'Display stats:', 'woocommerce-admin' ) }
</MenuTitle> </MenuTitle>
{ indicators.map( ( indicator, i ) => { { indicators.map( ( indicator, i ) => {
const checked = ! hiddenBlocks.includes( const checked = ! hiddenBlocks.includes(
@ -124,8 +124,8 @@ class StorePerformance extends Component {
const { compare } = getDateParamsFromQuery( query, defaultDateRange ); const { compare } = getDateParamsFromQuery( query, defaultDateRange );
const prevLabel = const prevLabel =
compare === 'previous_period' compare === 'previous_period'
? __( 'Previous Period:', 'woocommerce-admin' ) ? __( 'Previous period:', 'woocommerce-admin' )
: __( 'Previous Year:', 'woocommerce-admin' ); : __( 'Previous year:', 'woocommerce-admin' );
const { formatAmount, getCurrencyConfig } = this.context; const { formatAmount, getCurrencyConfig } = this.context;
const currency = getCurrencyConfig(); const currency = getCurrencyConfig();
return ( return (

View File

@ -73,7 +73,7 @@ export const StatsList = ( {
label={ item.label } label={ item.label }
value={ primaryValue } value={ primaryValue }
prevLabel={ __( prevLabel={ __(
'Previous Period:', 'Previous period:',
'woocommerce-admin' 'woocommerce-admin'
) } ) }
prevValue={ secondaryValue } prevValue={ secondaryValue }

View File

@ -62,7 +62,7 @@ describe( 'StatsOverview tracking', () => {
} ); } );
fireEvent.click( ellipsisBtn ); fireEvent.click( ellipsisBtn );
const totalSalesBtn = screen.getByRole( 'menuitemcheckbox', { const totalSalesBtn = screen.getByRole( 'menuitemcheckbox', {
name: 'Total Sales', name: 'Total sales',
} ); } );
fireEvent.click( totalSalesBtn ); fireEvent.click( totalSalesBtn );
@ -111,7 +111,7 @@ describe( 'StatsOverview toggle and persist stat preference', () => {
} ); } );
fireEvent.click( ellipsisBtn ); fireEvent.click( ellipsisBtn );
const totalSalesBtn = screen.getByRole( 'menuitemcheckbox', { const totalSalesBtn = screen.getByRole( 'menuitemcheckbox', {
name: 'Total Sales', name: 'Total sales',
} ); } );
fireEvent.click( totalSalesBtn ); fireEvent.click( totalSalesBtn );
@ -173,7 +173,7 @@ describe( 'StatsOverview period selection', () => {
stats: [ stats: [
{ {
chart: 'total_sales', chart: 'total_sales',
label: 'Total Sales', label: 'Total sales',
stat: 'revenue/total_sales', stat: 'revenue/total_sales',
}, },
{ {

View File

@ -12,7 +12,7 @@ import { StatsList } from '../stats-list';
jest.mock( '@woocommerce/tracks' ); jest.mock( '@woocommerce/tracks' );
const stats = [ const stats = [
{ stat: 'revenue/net_revenue', label: 'Net Sales' }, { stat: 'revenue/net_revenue', label: 'Net sales' },
{ stat: 'orders/orders_count', label: 'Orders' }, { stat: 'orders/orders_count', label: 'Orders' },
]; ];
@ -21,7 +21,7 @@ const data = {
{ {
stat: 'revenue/net_revenue', stat: 'revenue/net_revenue',
chart: 'net_revenue', chart: 'net_revenue',
label: 'Net Sales', label: 'Net sales',
format: 'currency', format: 'currency',
value: 100, value: 100,
_links: { _links: {
@ -68,7 +68,7 @@ describe( 'StatsList', () => {
); );
// Check that there should be two. // Check that there should be two.
expect( screen.getByText( 'Net Sales' ) ).toBeDefined(); expect( screen.getByText( 'Net sales' ) ).toBeDefined();
expect( screen.getByText( 'Orders' ) ).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( expect( recordEvent ).toHaveBeenCalledWith(
'statsoverview_indicators_click', 'statsoverview_indicators_click',

View File

@ -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. 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) - [Historical Data Import](analytics-historical-data-import.md)

View File

@ -40,7 +40,7 @@ For stores with Stock Management enabled, the Stock panel will be displayed.
![Stock Activity Panel](images/activity-panels-stock.png) ![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. "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. 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. If no Products require attention, the panel will reflect that state.

View File

@ -9,12 +9,12 @@ The Date Range picker allows you to specify which dates you want to include in t
- Today - Today
- Yesterday - Yesterday
- Week to Date - Week to date
- Last Week - Last week
- Month to Date - Month to date
- Last Month - Last month
- Quarter to Date - Quarter to date
- Last Year - Last year
You can also select which date range to compare against, either the same range from the _Prior Year_ or the _Prior Period_. 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. 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 ## 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) ![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. 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) ![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. 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.

View File

@ -2,7 +2,7 @@
The Categories Report provides insight about the product categories of your store. 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) ![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: The report table allows sorting by all columns:
- Category - Category
- Items Sold - Items sold
- Net Sales - Net sales
- Products (# of unique products sold) - Products (# of unique products sold)
- Orders (# of orders containing a product in that category) - Orders (# of orders containing a product in that category)
@ -60,11 +60,11 @@ Two of the Categories report columns contain clickable entries:
- `Category` - `Category`
- `Products` - `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 - `Product` link opens the Products report for that product
- `Orders` link opens the Orders 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

View File

@ -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: The report table allows sorting by the following columns:
- Coupon Code - Coupon code
- Orders (Number of orders) - Orders (Number of orders)
- Amount Dsicounted - Amount Dsicounted
@ -42,5 +42,5 @@ The report table allows sorting by the following columns:
Two of the report columns contain clickable entries: 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 - `Orders` link opens the [Orders Report](analytics-orders-report.md) filtered to orders which used that coupon

View File

@ -22,7 +22,7 @@ There are several filters available to the Customers Report:
- Email - Email
- Orders (count) - Orders (count)
- Total Spend - Total Spend
- AOV (Average Order Value) - AOV (Average order value)
- Registered - Registered
- Last Active - Last Active

View File

@ -14,43 +14,43 @@ If you removed a dashboard section, or you have an extension installed that adds
## Performance Indicator Section ## 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. 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: 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 ) | | Indicator Name | Description | Links To ( Report Name > Chart Name ) |
|---|---|---| |---|---|---|
| Total Sales | Gross Sales - Returns - Coupons + Taxes + Shipping | Revenue Report > Total Sales | | Total sales | Gross sales - Returns - Coupons + Taxes + Shipping | Revenue Report > Total sales |
| Net Sales | Gross Sales - Returns - Coupons | Revenue Report > Net 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 | | 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 | | Average order value | Net sales / Orders | Orders Report > Average order value |
| Items Sold | The discrete number of items sold. | Products Report > Items Sold | | Items sold | The discrete number of items sold. | Products Report > Items sold |
| Refunds | Money returned to the customer via a refund | Revenue Report > Refunds | | 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 |
| Net Discount Amount | Total sum of discounts from coupons. | Coupons Report > Amount | | Net discount amount | Total sum of discounts from coupons. | Coupons Report > Amount |
| Total Tax | Order Tax + Shipping Tax | Taxes Report > Total 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 | | 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 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 | | Shipping | The shipping charges associated with an order or refund. | Revenue Report > Shipping |
| Downloads | Total count of downloaded files | Downloads Report > Download Count | | 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 ## 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: 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 ) | | Chart Name | Description | Links To ( Report Name > Chart Name ) |
|---|---|---| |---|---|---|
| Total Sales | Gross Sales - Returns - Coupons + Taxes + Shipping | Revenue Report > Total Sales | | Total sales | Gross sales - Returns - Coupons + Taxes + Shipping | Revenue Report > Total sales |
| Net Sales | Gross Sales - Returns - Coupons | Revenue Report > Net 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 | | 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 | | Average order value | Net sales / Orders | Orders Report > Average order value |
| Items Sold | The discrete number of items sold. | Products Report > Items Sold | | Items sold | The discrete number of items sold. | Products Report > Items sold |
| Refunds | Money returned to the customer via a refund | Revenue Report > Refunds | | 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 | | Gross Discount Amount | Total sum of discounts from coupons. | Coupons Report > Amount |
| Total Tax | Order Tax + Shipping Tax | Taxes Report > Total 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 | | 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 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 | | Shipping | The shipping charges associated with an order or refund. | Revenue Report > Shipping |
| Downloads | Total count of downloaded files | Downloads Report > Download Count | | 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 Customers, Total Spend
- Top Coupons, Number of Orders - Top Coupons, Number of Orders
- Top Categories, Items Sold - Top categories, Items sold
- Top Products, Items Sold - Top products, Items sold

View File

@ -4,7 +4,7 @@ The Downloads Report provides insight into the performance of your store's downl
### All Downloads View ### 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) ![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: The report table allows sorting by the following columns:
- Date - Date
- Product Title - Product title

View File

@ -8,7 +8,7 @@ Stores with existing Orders will be prompted to import their data:
### Starting the Import ### 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) ![Analytics > Settings > Import historical data](images/analytics-historical-data-import-ready-to-import.png)

View File

@ -22,7 +22,7 @@ The following fields can be used for filtering:
- Order Status - Order Status
- Products - Products
- Coupon Codes - Coupon Codes
- Customer Type - Customer type
- Refunds - Refunds
- Tax Rates - Tax Rates
@ -33,7 +33,7 @@ The following fields can be used for filtering:
The report table allows sorting by the following columns: The report table allows sorting by the following columns:
- Date - Date
- Items Sold - Items sold
- Net Sales - Net sales
By default, the report shows the most recent orders. By default, the report shows the most recent orders.

View File

@ -4,7 +4,7 @@ The Products Report provides insight into the sales performance of each product
### All Products View ### 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) ![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) ![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) ![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: The report table contains the following columns:
- Product Title - links to Single Product view - Product title - links to Single product view
- SKU - SKU
- Items Sold (count) - Items sold (count)
- Net Sales - Net sales
- Orders (count) - links to Orders Report filtered by product - Orders (count) - links to Orders Report filtered by product
- Category - links to Categories Report - Category - links to Categories Report
- Variations (count) - Variations (count)
@ -54,10 +54,10 @@ The report table contains the following columns:
The report table allows sorting by the following columns: The report table allows sorting by the following columns:
- Product Title - Product title
- SKU - SKU
- Items Sold (count) - Items sold (count)
- Net Sales - Net sales
- Orders (count) - Orders (count)
- Variations (count) - Variations (count)
@ -65,7 +65,7 @@ By default, the report sorts products by most items sold.
#### Clarifying Terms #### 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`. As an equation, it might look like: `(product price * quantity) - refunds - coupons`.

View File

@ -10,13 +10,13 @@ The report table allows sorting by the all report columns:
- Date - Date
- Orders (# of orders) - Orders (# of orders)
- Gross Sales - Gross sales
- Returns (Return amount) - Returns (Return amount)
- Coupons (Coupon amount) - Coupons (Coupon amount)
- Net Sales - Net sales
- Taxes - Taxes
- Shipping - Shipping
- Total Sales - Total sales
By default, the report shows the most recent days. By default, the report shows the most recent days.

View File

@ -5,8 +5,8 @@ WooCommerce Admin is pre-configured with default settings for WooCommerce Analyt
- Excluded Statuses - Excluded Statuses
- Actionable Statuses - See [Activity Panels](activity-panels.md) for details - Actionable Statuses - See [Activity Panels](activity-panels.md) for details
- Default Date Range - Default Date Range
- Import Historical Data - See [Importing Historical Data](analytics-historical-data-import.md) for details - Import historical data - See [Importing Historical Data](analytics-historical-data-import.md) for details
- Reset Defaults - Reset defaults
### Excluded Statuses ### 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) ![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 ### 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`.

View File

@ -7,7 +7,7 @@ The Stock Report provides insight about the inventory of your store. This report
### Report Filter ### 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) ![Stock Report Filter](images/analytics-stock-status-filter.png)

View File

@ -4,7 +4,7 @@ The Taxes Report provides insight into taxes collected on your store.
### All Taxes View ### 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) ![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: The report table allows sorting by the following columns:
- Tax Code - Tax code
- Rate - Rate
- Total Tax (Order Tax + Shipping Tax) - Total tax (Order tax + Shipping tax)
- Order Tax - Order tax
- Shipping Tax - Shipping tax
- Orders (count) - Orders (count)
By default, the report is sorted by the creation date of the tax codes. By default, the report is sorted by the creation date of the tax codes.
### Report Links ### 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.

View File

@ -4,7 +4,7 @@ The Variations Report provides insight into the sales performance of each Produc
### All Variations View ### 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) ![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) ![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 ### Comparison Mode
@ -41,16 +41,16 @@ The following fields can be used for filtering:
- Product (parent product) - Product (parent product)
- Category - 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 ### Report Columns
The report table contains the following columns: The report table contains the following columns:
- Variation Title - links to Edit Product screen - Variation title - links to Edit Product screen
- SKU - SKU
- Items Sold (count) - Items sold (count)
- Net Sales - Net sales
- Orders (count) - links to Orders Report filtered by Variation - Orders (count) - links to Orders Report filtered by Variation
- Status (in/out stock) - Status (in/out stock)
- Stock (inventory quantity) - Stock (inventory quantity)
@ -60,15 +60,15 @@ The report table contains the following columns:
The report table allows sorting by the following columns: The report table allows sorting by the following columns:
- SKU - SKU
- Items Sold (count) - Items sold (count)
- Net Sales - Net sales
- Orders (count) - Orders (count)
By default, the report sorts Variations by most items sold. By default, the report sorts Variations by most items sold.
#### Clarifying Terms #### 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`. As an equation, it might look like: `(variation price * quantity) - refunds - coupons`.

View File

@ -4,7 +4,7 @@ Displays a configurable set of filters which can modify query parameters. Displa
## Usage ## 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 ```js
const config = { const config = {

View File

@ -78,7 +78,7 @@ const advancedFilters = {
}, },
customer: { customer: {
labels: { labels: {
add: 'Customer Type', add: 'Customer type',
remove: 'Remove customer filter', remove: 'Remove customer filter',
rule: 'Select a customer filter match', rule: 'Select a customer filter match',
title: '{{title}}Customer is{{/title}} {{filter /}}', title: '{{title}}Customer is{{/title}} {{filter /}}',

View File

@ -23,7 +23,7 @@ const DateRangeExample = withState( {
return ( return (
<> <>
<H>Date Range Picker</H> <H>Date range picker</H>
<Section component={ false }> <Section component={ false }>
<DateRange <DateRange
after={ after } after={ after }

View File

@ -135,7 +135,7 @@ class DateRangeFilterPicker extends Component {
return ( return (
<div className="woocommerce-filters-filter"> <div className="woocommerce-filters-filter">
<span className="woocommerce-filters-label"> <span className="woocommerce-filters-label">
{ __( 'Date Range', 'woocommerce-admin' ) }: { __( 'Date range', 'woocommerce-admin' ) }:
</span> </span>
<Dropdown <Dropdown
contentClassName={ contentClasses } contentClassName={ contentClasses }

View File

@ -11,7 +11,7 @@ A button useful for a launcher of a dropdown component. The button is 100% width
<DropdownButton <DropdownButton
onClick={ onToggle } onClick={ onToggle }
isOpen={ isOpen } isOpen={ isOpen }
labels={ [ 'All Products Sold' ] } labels={ [ 'All products Sold' ] }
/> />
) } ) }
renderContent={ () => ( renderContent={ () => (

View File

@ -10,7 +10,7 @@ export const Basic = () => (
<DropdownButton <DropdownButton
onClick={ onToggle } onClick={ onToggle }
isOpen={ isOpen } isOpen={ isOpen }
labels={ [ 'All Products Sold' ] } labels={ [ 'All products Sold' ] }
/> />
) } ) }
renderContent={ () => <p>Dropdown content here</p> } renderContent={ () => <p>Dropdown content here</p> }

View File

@ -10,7 +10,7 @@ This is a dropdown menu hidden behind a vertical ellipsis icon. When clicked, th
renderContent={ ( { onToggle } )=> { renderContent={ ( { onToggle } )=> {
return ( return (
<div> <div>
<MenuTitle>Display Stats</MenuTitle> <MenuTitle>Display stats</MenuTitle>
<MenuItem onInvoke={ () => setState( { showCustomers: ! showCustomers } ) }> <MenuItem onInvoke={ () => setState( { showCustomers: ! showCustomers } ) }>
<ToggleControl <ToggleControl
label="Show Customers" label="Show Customers"
@ -87,7 +87,7 @@ MenuTitle
## Usage ## Usage
```jsx ```jsx
<MenuTitle>Display Stats</MenuTitle> <MenuTitle>Display stats</MenuTitle>
``` ```
### Props ### Props

View File

@ -15,7 +15,7 @@ const ExampleEllipsisMenu = withState( {
label="Choose which analytics to display" label="Choose which analytics to display"
renderContent={ ( { onToggle } ) => ( renderContent={ ( { onToggle } ) => (
<Fragment> <Fragment>
<MenuTitle>Display Stats</MenuTitle> <MenuTitle>Display stats</MenuTitle>
<MenuItem <MenuItem
isCheckbox isCheckbox
isClickable isClickable

View File

@ -51,8 +51,8 @@ const filters = [
param: 'filter', param: 'filter',
showFilters: () => true, showFilters: () => true,
filters: [ filters: [
{ label: 'All Orders', value: 'all' }, { label: 'All orders', value: 'all' },
{ label: 'Advanced Filters', value: 'advanced' }, { label: 'Advanced filters', value: 'advanced' },
], ],
}, },
]; ];
@ -113,7 +113,7 @@ const advancedFilters = {
}, },
customer: { customer: {
labels: { labels: {
add: 'Customer Type', add: 'Customer type',
remove: 'Remove customer filter', remove: 'Remove customer filter',
rule: 'Select a customer filter match', rule: 'Select a customer filter match',
title: 'Customer is {{filter /}}', title: 'Customer is {{filter /}}',
@ -217,7 +217,7 @@ export const Examples = () => (
/> />
</Section> </Section>
<H>Advanced Filters</H> <H>Advanced filters</H>
<Section component={ false }> <Section component={ false }>
<AdvancedFilters <AdvancedFilters
siteLocale={ siteLocale } siteLocale={ siteLocale }

View File

@ -6,7 +6,7 @@ A header component. The header can contain a title, actions via children, and an
## Usage ## Usage
```jsx ```jsx
<SectionHeader title="Section Title" /> <SectionHeader title="Section title" />
``` ```
### Props ### Props

View File

@ -12,7 +12,7 @@ A container element for a list of SummaryNumbers. This component handles detecti
<SummaryNumber <SummaryNumber
key="revenue" key="revenue"
value={ '$829.40' } value={ '$829.40' }
label="Total Sales" label="Total sales"
delta={ 29 } delta={ 29 }
href="/analytics/report" 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) `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" `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 `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 `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) `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 `selected` | Boolean | `false` | A boolean used to show a highlight style on this number

View File

@ -184,7 +184,7 @@ SummaryNumber.propTypes = {
*/ */
onToggle: PropTypes.func, 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, prevLabel: PropTypes.string,
/** /**
@ -214,7 +214,7 @@ SummaryNumber.defaultProps = {
href: '', href: '',
hrefType: 'wc-admin', hrefType: 'wc-admin',
isOpen: false, isOpen: false,
prevLabel: __( 'Previous Period:', 'woocommerce-admin' ), prevLabel: __( 'Previous period:', 'woocommerce-admin' ),
reverseTrend: false, reverseTrend: false,
selected: false, selected: false,
onLinkClickCallback: noop, onLinkClickCallback: noop,

View File

@ -10,7 +10,7 @@ export const Basic = () => (
<SummaryNumber <SummaryNumber
key="revenue" key="revenue"
value={ '$829.40' } value={ '$829.40' }
label="Total Sales" label="Total sales"
delta={ 29 } delta={ 29 }
href="/analytics/report" href="/analytics/report"
> >

View File

@ -40,7 +40,7 @@ const summary = [
]; ];
<TableCard <TableCard
title="Revenue Last Week" title="Revenue last week"
rows={ rows } rows={ rows }
headers={ headers } headers={ headers }
query={ { page: 2 } } query={ { page: 2 } }
@ -132,7 +132,7 @@ const headers = [
]; ];
<TablePlaceholder <TablePlaceholder
caption="Revenue Last Week" caption="Revenue last week"
headers={ headers } headers={ headers }
/> />
``` ```
@ -221,7 +221,7 @@ const rows = [
```jsx ```jsx
<Table <Table
caption="Revenue Last Week" caption="Revenue last week"
rows={ rows } rows={ rows }
headers={ headers } headers={ headers }
rowKey={ row => row.display } rowKey={ row => row.display }

View File

@ -19,7 +19,7 @@ const TableCardExample = withState( {
}, },
} )( ( { query, setState } ) => ( } )( ( { query, setState } ) => (
<TableCard <TableCard
title="Revenue Last Week" title="Revenue last week"
rows={ rows } rows={ rows }
headers={ headers } headers={ headers }
onQueryChange={ ( param ) => ( value ) => onQueryChange={ ( param ) => ( value ) =>

View File

@ -11,7 +11,7 @@ import { headers } from './index';
export const Basic = () => ( export const Basic = () => (
<Card size={ null }> <Card size={ null }>
<TablePlaceholder caption="Revenue Last Week" headers={ headers } /> <TablePlaceholder caption="Revenue last week" headers={ headers } />
</Card> </Card>
); );

View File

@ -12,7 +12,7 @@ import { rows, headers } from './index';
export const Basic = () => ( export const Basic = () => (
<Card size={ null }> <Card size={ null }>
<Table <Table
caption="Revenue Last Week" caption="Revenue last week"
rows={ rows } rows={ rows }
headers={ headers } headers={ headers }
rowKey={ ( row ) => row[ 0 ].value } rowKey={ ( row ) => row[ 0 ].value }

View File

@ -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-01 00:00:00,1,411,0,0,0,411
2018-10-02 00:00:00,0,0,,0,0,0`; 2018-10-02 00:00:00,0,0,,0,0,0`;

View File

@ -10,7 +10,7 @@ export default [
required: false, required: false,
}, },
{ {
label: 'Total Sales', label: 'Total sales',
key: 'total_sales', key: 'total_sales',
required: true, required: true,
}, },
@ -31,7 +31,7 @@ export default [
key: 'shipping', key: 'shipping',
}, },
{ {
label: 'Net Sales', label: 'Net sales',
key: 'net_revenue', key: 'net_revenue',
}, },
]; ];

View File

@ -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"`; 2018-04-29T00:00:00,30,"Lorem, ""ipsum""",200,19,19,100,19,200,"\t-123"`;

View File

@ -12,7 +12,7 @@ export default [
key: 'description', key: 'description',
}, },
{ {
label: 'Total Sales', label: 'Total sales',
key: 'total_sales', key: 'total_sales',
}, },
{ {
@ -32,11 +32,11 @@ export default [
key: 'shipping', key: 'shipping',
}, },
{ {
label: 'Net Sales', label: 'Net sales',
key: 'net_revenue', key: 'net_revenue',
}, },
{ {
label: 'Negative Number', label: 'Negative number',
key: 'neg_num', key: 'neg_num',
}, },
]; ];

View File

@ -33,25 +33,25 @@ export const defaultDateTimeFormat = 'YYYY-MM-DDTHH:mm:ss';
export const presetValues = [ export const presetValues = [
{ value: 'today', label: __( 'Today', 'woocommerce-admin' ) }, { value: 'today', label: __( 'Today', 'woocommerce-admin' ) },
{ value: 'yesterday', label: __( 'Yesterday', 'woocommerce-admin' ) }, { value: 'yesterday', label: __( 'Yesterday', 'woocommerce-admin' ) },
{ value: 'week', label: __( 'Week to Date', 'woocommerce-admin' ) }, { value: 'week', label: __( 'Week to date', 'woocommerce-admin' ) },
{ value: 'last_week', label: __( 'Last Week', 'woocommerce-admin' ) }, { value: 'last_week', label: __( 'Last week', 'woocommerce-admin' ) },
{ value: 'month', label: __( 'Month to Date', 'woocommerce-admin' ) }, { value: 'month', label: __( 'Month to date', 'woocommerce-admin' ) },
{ value: 'last_month', label: __( 'Last Month', 'woocommerce-admin' ) }, { value: 'last_month', label: __( 'Last month', 'woocommerce-admin' ) },
{ value: 'quarter', label: __( 'Quarter to Date', 'woocommerce-admin' ) }, { value: 'quarter', label: __( 'Quarter to date', 'woocommerce-admin' ) },
{ value: 'last_quarter', label: __( 'Last Quarter', 'woocommerce-admin' ) }, { value: 'last_quarter', label: __( 'Last quarter', 'woocommerce-admin' ) },
{ value: 'year', label: __( 'Year to Date', 'woocommerce-admin' ) }, { value: 'year', label: __( 'Year to date', 'woocommerce-admin' ) },
{ value: 'last_year', label: __( 'Last Year', 'woocommerce-admin' ) }, { value: 'last_year', label: __( 'Last year', 'woocommerce-admin' ) },
{ value: 'custom', label: __( 'Custom', 'woocommerce-admin' ) }, { value: 'custom', label: __( 'Custom', 'woocommerce-admin' ) },
]; ];
export const periods = [ export const periods = [
{ {
value: 'previous_period', value: 'previous_period',
label: __( 'Previous Period', 'woocommerce-admin' ), label: __( 'Previous period', 'woocommerce-admin' ),
}, },
{ {
value: 'previous_year', value: 'previous_year',
label: __( 'Previous Year', 'woocommerce-admin' ), label: __( 'Previous year', 'woocommerce-admin' ),
}, },
]; ];

View File

@ -72,12 +72,12 @@ global.wcSettings = {
performanceIndicators: [ performanceIndicators: [
{ {
chart: 'total_sales', chart: 'total_sales',
label: 'Total Sales', label: 'Total sales',
stat: 'revenue/total_sales', stat: 'revenue/total_sales',
}, },
{ {
chart: 'net_revenue', chart: 'net_revenue',
label: 'Net Sales', label: 'Net sales',
stat: 'revenue/net_revenue', stat: 'revenue/net_revenue',
}, },
{ {
@ -87,7 +87,7 @@ global.wcSettings = {
}, },
{ {
chart: 'items_sold', chart: 'items_sold',
label: 'Items Sold', label: 'Items sold',
stat: 'products/items_sold', stat: 'products/items_sold',
}, },
], ],

View File

@ -294,7 +294,7 @@ describe( 'getDefaultOptionValue', () => {
it( 'should return the default option value', () => { it( 'should return the default option value', () => {
const options = [ { value: 'new' }, { value: 'returning' } ]; const options = [ { value: 'new' }, { value: 'returning' } ];
const currentFilter = { const currentFilter = {
labels: { add: 'Customer Type' }, labels: { add: 'Customer type' },
input: { input: {
component: 'SelectControl', component: 'SelectControl',
options, options,
@ -308,7 +308,7 @@ describe( 'getDefaultOptionValue', () => {
it( 'should return the first option value when no default option', () => { it( 'should return the first option value when no default option', () => {
const options = [ { value: 'new' }, { value: 'returning' } ]; const options = [ { value: 'new' }, { value: 'returning' } ];
const currentFilter = { const currentFilter = {
labels: { add: 'Customer Type' }, labels: { add: 'Customer type' },
input: { input: {
component: 'SelectControl', component: 'SelectControl',
options, options,

View File

@ -122,13 +122,13 @@ class Leaderboards extends \WC_REST_Data_Controller {
'label' => __( 'Top Coupons - Number of Orders', 'woocommerce-admin' ), 'label' => __( 'Top Coupons - Number of Orders', 'woocommerce-admin' ),
'headers' => array( 'headers' => array(
array( array(
'label' => __( 'Coupon Code', 'woocommerce-admin' ), 'label' => __( 'Coupon code', 'woocommerce-admin' ),
), ),
array( array(
'label' => __( 'Orders', 'woocommerce-admin' ), 'label' => __( 'Orders', 'woocommerce-admin' ),
), ),
array( array(
'label' => __( 'Amount Discounted', 'woocommerce-admin' ), 'label' => __( 'Amount discounted', 'woocommerce-admin' ),
), ),
), ),
'rows' => $rows, 'rows' => $rows,
@ -188,16 +188,16 @@ class Leaderboards extends \WC_REST_Data_Controller {
return array( return array(
'id' => 'categories', 'id' => 'categories',
'label' => __( 'Top Categories - Items Sold', 'woocommerce-admin' ), 'label' => __( 'Top categories - Items sold', 'woocommerce-admin' ),
'headers' => array( 'headers' => array(
array( array(
'label' => __( 'Category', 'woocommerce-admin' ), 'label' => __( 'Category', 'woocommerce-admin' ),
), ),
array( array(
'label' => __( 'Items Sold', 'woocommerce-admin' ), 'label' => __( 'Items sold', 'woocommerce-admin' ),
), ),
array( array(
'label' => __( 'Net Sales', 'woocommerce-admin' ), 'label' => __( 'Net sales', 'woocommerce-admin' ),
), ),
), ),
'rows' => $rows, 'rows' => $rows,
@ -324,16 +324,16 @@ class Leaderboards extends \WC_REST_Data_Controller {
return array( return array(
'id' => 'products', 'id' => 'products',
'label' => __( 'Top Products - Items Sold', 'woocommerce-admin' ), 'label' => __( 'Top products - Items sold', 'woocommerce-admin' ),
'headers' => array( 'headers' => array(
array( array(
'label' => __( 'Product', 'woocommerce-admin' ), 'label' => __( 'Product', 'woocommerce-admin' ),
), ),
array( array(
'label' => __( 'Items Sold', 'woocommerce-admin' ), 'label' => __( 'Items sold', 'woocommerce-admin' ),
), ),
array( array(
'label' => __( 'Net Sales', 'woocommerce-admin' ), 'label' => __( 'Net sales', 'woocommerce-admin' ),
), ),
), ),
'rows' => $rows, 'rows' => $rows,

View File

@ -176,7 +176,7 @@ class Controller extends ReportsController implements ExportableInterface {
'readonly' => true, 'readonly' => true,
), ),
'net_revenue' => array( 'net_revenue' => array(
'description' => __( 'Total Sales.', 'woocommerce-admin' ), 'description' => __( 'Total sales.', 'woocommerce-admin' ),
'type' => 'number', 'type' => 'number',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),
'readonly' => true, 'readonly' => true,
@ -327,7 +327,7 @@ class Controller extends ReportsController implements ExportableInterface {
public function get_export_columns() { public function get_export_columns() {
$export_columns = array( $export_columns = array(
'category' => __( 'Category', 'woocommerce-admin' ), 'category' => __( 'Category', 'woocommerce-admin' ),
'items_sold' => __( 'Items Sold', 'woocommerce-admin' ), 'items_sold' => __( 'Items sold', 'woocommerce-admin' ),
'net_revenue' => __( 'Net Revenue', 'woocommerce-admin' ), 'net_revenue' => __( 'Net Revenue', 'woocommerce-admin' ),
'products_count' => __( 'Products', 'woocommerce-admin' ), 'products_count' => __( 'Products', 'woocommerce-admin' ),
'orders_count' => __( 'Orders', 'woocommerce-admin' ), 'orders_count' => __( 'Orders', 'woocommerce-admin' ),

View File

@ -296,9 +296,9 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
*/ */
public function get_export_columns() { public function get_export_columns() {
$export_columns = array( $export_columns = array(
'code' => __( 'Coupon Code', 'woocommerce-admin' ), 'code' => __( 'Coupon code', 'woocommerce-admin' ),
'orders_count' => __( 'Orders', 'woocommerce-admin' ), 'orders_count' => __( 'Orders', 'woocommerce-admin' ),
'amount' => __( 'Amount Discounted', 'woocommerce-admin' ), 'amount' => __( 'Amount discounted', 'woocommerce-admin' ),
'created' => __( 'Created', 'woocommerce-admin' ), 'created' => __( 'Created', 'woocommerce-admin' ),
'expires' => __( 'Expires', 'woocommerce-admin' ), 'expires' => __( 'Expires', 'woocommerce-admin' ),
'type' => __( 'Type', 'woocommerce-admin' ), 'type' => __( 'Type', 'woocommerce-admin' ),

View File

@ -155,7 +155,7 @@ class Controller extends \WC_REST_Reports_Controller {
'readonly' => true, 'readonly' => true,
), ),
'orders_count' => array( 'orders_count' => array(
'title' => __( 'Discounted Orders', 'woocommerce-admin' ), 'title' => __( 'Discounted orders', 'woocommerce-admin' ),
'description' => __( 'Number of discounted orders.', 'woocommerce-admin' ), 'description' => __( 'Number of discounted orders.', 'woocommerce-admin' ),
'type' => 'integer', 'type' => 'integer',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),

View File

@ -389,8 +389,8 @@ class Controller extends ReportsController implements ExportableInterface {
public function get_export_columns() { public function get_export_columns() {
$export_columns = array( $export_columns = array(
'date' => __( 'Date', 'woocommerce-admin' ), 'date' => __( 'Date', 'woocommerce-admin' ),
'product' => __( 'Product Title', 'woocommerce-admin' ), 'product' => __( 'Product title', 'woocommerce-admin' ),
'file_name' => __( 'File Name', 'woocommerce-admin' ), 'file_name' => __( 'File name', 'woocommerce-admin' ),
'order_number' => __( 'Order #', 'woocommerce-admin' ), 'order_number' => __( 'Order #', 'woocommerce-admin' ),
'user_id' => __( 'User Name', 'woocommerce-admin' ), 'user_id' => __( 'User Name', 'woocommerce-admin' ),
'ip_address' => __( 'IP', 'woocommerce-admin' ), 'ip_address' => __( 'IP', 'woocommerce-admin' ),

View File

@ -532,12 +532,12 @@ class Controller extends ReportsController implements ExportableInterface {
$export_columns = array( $export_columns = array(
'date_created' => __( 'Date', 'woocommerce-admin' ), 'date_created' => __( 'Date', 'woocommerce-admin' ),
'order_number' => __( 'Order #', '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' ), 'status' => __( 'Status', 'woocommerce-admin' ),
'customer_name' => __( 'Customer', 'woocommerce-admin' ), 'customer_name' => __( 'Customer', 'woocommerce-admin' ),
'customer_type' => __( 'Customer Type', 'woocommerce-admin' ), 'customer_type' => __( 'Customer type', 'woocommerce-admin' ),
'products' => __( 'Product(s)', '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' ), 'coupons' => __( 'Coupon(s)', 'woocommerce-admin' ),
'net_total' => __( 'N. Revenue', 'woocommerce-admin' ), 'net_total' => __( 'N. Revenue', 'woocommerce-admin' ),
); );

View File

@ -160,7 +160,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller {
public function get_item_schema() { public function get_item_schema() {
$data_values = array( $data_values = array(
'net_revenue' => array( 'net_revenue' => array(
'description' => __( 'Net Sales.', 'woocommerce-admin' ), 'description' => __( 'Net sales.', 'woocommerce-admin' ),
'type' => 'number', 'type' => 'number',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),
'readonly' => true, 'readonly' => true,

View File

@ -59,7 +59,7 @@ class Segmenter extends ReportsSegmenter {
/** /**
* Returns column => query mapping to be used for order-level segmenting query * 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 string $order_stats_table Name of SQL table containing the order-level info.
* @param array $overrides Array of overrides for default column calculations. * @param array $overrides Array of overrides for default column calculations.

View File

@ -173,7 +173,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
'type' => 'number', 'type' => 'number',
'readonly' => true, 'readonly' => true,
'context' => array( 'view', 'edit' ), '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( 'orders_count' => array(
'type' => 'integer', 'type' => 'integer',
@ -385,9 +385,9 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
*/ */
public function get_export_columns() { public function get_export_columns() {
$export_columns = array( $export_columns = array(
'product_name' => __( 'Product Title', 'woocommerce-admin' ), 'product_name' => __( 'Product title', 'woocommerce-admin' ),
'sku' => __( 'SKU', 'woocommerce-admin' ), 'sku' => __( 'SKU', 'woocommerce-admin' ),
'items_sold' => __( 'Items Sold', 'woocommerce-admin' ), 'items_sold' => __( 'Items sold', 'woocommerce-admin' ),
'net_revenue' => __( 'N. Revenue', 'woocommerce-admin' ), 'net_revenue' => __( 'N. Revenue', 'woocommerce-admin' ),
'orders_count' => __( 'Orders', 'woocommerce-admin' ), 'orders_count' => __( 'Orders', 'woocommerce-admin' ),
'product_cat' => __( 'Category', 'woocommerce-admin' ), 'product_cat' => __( 'Category', 'woocommerce-admin' ),

View File

@ -156,7 +156,7 @@ class Controller extends \WC_REST_Reports_Controller {
public function get_item_schema() { public function get_item_schema() {
$data_values = array( $data_values = array(
'items_sold' => array( 'items_sold' => array(
'title' => __( 'Products Sold', 'woocommerce-admin' ), 'title' => __( 'Products sold', 'woocommerce-admin' ),
'description' => __( 'Number of product items sold.', 'woocommerce-admin' ), 'description' => __( 'Number of product items sold.', 'woocommerce-admin' ),
'type' => 'integer', 'type' => 'integer',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),
@ -164,7 +164,7 @@ class Controller extends \WC_REST_Reports_Controller {
'indicator' => true, 'indicator' => true,
), ),
'net_revenue' => array( 'net_revenue' => array(
'description' => __( 'Net Sales.', 'woocommerce-admin' ), 'description' => __( 'Net sales.', 'woocommerce-admin' ),
'type' => 'number', 'type' => 'number',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),
'readonly' => true, 'readonly' => true,

View File

@ -164,7 +164,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
public function get_item_schema() { public function get_item_schema() {
$data_values = array( $data_values = array(
'total_sales' => array( 'total_sales' => array(
'description' => __( 'Total Sales.', 'woocommerce-admin' ), 'description' => __( 'Total sales.', 'woocommerce-admin' ),
'type' => 'number', 'type' => 'number',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),
'readonly' => true, 'readonly' => true,
@ -172,7 +172,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
'format' => 'currency', 'format' => 'currency',
), ),
'net_revenue' => array( 'net_revenue' => array(
'description' => __( 'Net Sales.', 'woocommerce-admin' ), 'description' => __( 'Net sales.', 'woocommerce-admin' ),
'type' => 'number', 'type' => 'number',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),
'readonly' => true, 'readonly' => true,
@ -236,7 +236,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
'readonly' => true, 'readonly' => true,
), ),
'gross_sales' => array( 'gross_sales' => array(
'description' => __( 'Gross Sales.', 'woocommerce-admin' ), 'description' => __( 'Gross sales.', 'woocommerce-admin' ),
'type' => 'number', 'type' => 'number',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),
'readonly' => true, 'readonly' => true,
@ -447,8 +447,8 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
return array( return array(
'date' => __( 'Date', 'woocommerce-admin' ), 'date' => __( 'Date', 'woocommerce-admin' ),
'orders_count' => __( 'Orders', 'woocommerce-admin' ), 'orders_count' => __( 'Orders', 'woocommerce-admin' ),
'gross_sales' => __( 'Gross Sales', 'woocommerce-admin' ), 'gross_sales' => __( 'Gross sales', 'woocommerce-admin' ),
'total_sales' => __( 'Total Sales', 'woocommerce-admin' ), 'total_sales' => __( 'Total sales', 'woocommerce-admin' ),
'refunds' => __( 'Returns', 'woocommerce-admin' ), 'refunds' => __( 'Returns', 'woocommerce-admin' ),
'coupons' => __( 'Coupons', 'woocommerce-admin' ), 'coupons' => __( 'Coupons', 'woocommerce-admin' ),
'taxes' => __( 'Taxes', 'woocommerce-admin' ), 'taxes' => __( 'Taxes', 'woocommerce-admin' ),

View File

@ -299,11 +299,11 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf
*/ */
public function get_export_columns() { public function get_export_columns() {
return array( return array(
'tax_code' => __( 'Tax Code', 'woocommerce-admin' ), 'tax_code' => __( 'Tax code', 'woocommerce-admin' ),
'rate' => __( 'Rate', 'woocommerce-admin' ), 'rate' => __( 'Rate', 'woocommerce-admin' ),
'total_tax' => __( 'Total Tax', 'woocommerce-admin' ), 'total_tax' => __( 'Total tax', 'woocommerce-admin' ),
'order_tax' => __( 'Order Tax', 'woocommerce-admin' ), 'order_tax' => __( 'Order tax', 'woocommerce-admin' ),
'shipping_tax' => __( 'Shipping Tax', 'woocommerce-admin' ), 'shipping_tax' => __( 'Shipping tax', 'woocommerce-admin' ),
'orders_count' => __( 'Orders', 'woocommerce-admin' ), 'orders_count' => __( 'Orders', 'woocommerce-admin' ),
); );
} }

View File

@ -183,7 +183,7 @@ class Controller extends ReportsController implements ExportableInterface {
'type' => 'number', 'type' => 'number',
'readonly' => true, 'readonly' => true,
'context' => array( 'view', 'edit' ), '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( 'orders_count' => array(
'type' => 'integer', 'type' => 'integer',
@ -409,9 +409,9 @@ class Controller extends ReportsController implements ExportableInterface {
*/ */
public function get_export_columns() { public function get_export_columns() {
$export_columns = array( $export_columns = array(
'product_name' => __( 'Product / Variation Title', 'woocommerce-admin' ), 'product_name' => __( 'Product / Variation title', 'woocommerce-admin' ),
'sku' => __( 'SKU', 'woocommerce-admin' ), 'sku' => __( 'SKU', 'woocommerce-admin' ),
'items_sold' => __( 'Items Sold', 'woocommerce-admin' ), 'items_sold' => __( 'Items sold', 'woocommerce-admin' ),
'net_revenue' => __( 'N. Revenue', 'woocommerce-admin' ), 'net_revenue' => __( 'N. Revenue', 'woocommerce-admin' ),
'orders_count' => __( 'Orders', 'woocommerce-admin' ), 'orders_count' => __( 'Orders', 'woocommerce-admin' ),
); );

View File

@ -161,7 +161,7 @@ class Controller extends \WC_REST_Reports_Controller {
'indicator' => true, 'indicator' => true,
), ),
'net_revenue' => array( 'net_revenue' => array(
'description' => __( 'Net Sales.', 'woocommerce-admin' ), 'description' => __( 'Net sales.', 'woocommerce-admin' ),
'type' => 'number', 'type' => 'number',
'context' => array( 'view', 'edit' ), 'context' => array( 'view', 'edit' ),
'readonly' => true, 'readonly' => true,

View File

@ -98,7 +98,7 @@ class NewSalesRecord {
$content = sprintf( $content = sprintf(
/* translators: 1 and 4: Date (e.g. October 16th), 2 and 3: Amount (e.g. $160.00) */ /* 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_yesterday,
$formatted_total, $formatted_total,
$formatted_record_amt, $formatted_record_amt,

View File

@ -274,9 +274,9 @@ class WC_Tests_Reports_Coupons extends WC_Unit_Test_Case {
// Test the CSV export. // Test the CSV export.
$expected_csv_columns = array( $expected_csv_columns = array(
'"Coupon Code"', '"Coupon code"',
'Orders', 'Orders',
'"Amount Discounted"', '"Amount discounted"',
'Created', 'Created',
'Expires', 'Expires',
'Type', 'Type',

View File

@ -475,7 +475,7 @@ class WC_Tests_Reports_Products extends WC_Unit_Test_Case {
); );
$expected_csv = chr( 239 ) . chr( 187 ) . chr( 191 ); $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; $expected_csv .= PHP_EOL;
$export = new ReportCSVExporter( 'products', $args ); $export = new ReportCSVExporter( 'products', $args );