Replace copy: List Price to Regular Price (#47658)

* Replace copy: List Price to Regular Price

* Add changelog files

* Fix md-docs linter errors and update the manifest
This commit is contained in:
Maikel Perez 2024-05-21 16:28:01 -04:00 committed by GitHub
parent c4e1cebe84
commit 4c0399991a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 119 additions and 112 deletions

View File

@ -676,7 +676,7 @@
"post_title": "Product editor extensibility guidelines", "post_title": "Product editor extensibility guidelines",
"menu_title": "Extensibility guidelines", "menu_title": "Extensibility guidelines",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/product-editor-development/product-editor-extensibility-guidelines.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/product-editor-development/product-editor-extensibility-guidelines.md",
"hash": "4e42c13decac01baccb57fa4f7542c3f14347ad60a53272a328bbc290e2a2625", "hash": "8b6102ecab0ceda36afe6d7b2b12fd9d1e62c893ed7409d79cc15da8fc1e76c8",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/product-editor-development/product-editor-extensibility-guidelines.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/product-editor-development/product-editor-extensibility-guidelines.md",
"id": "a837eb947d31fcff3c6e1f775926ba5eb13cd790" "id": "a837eb947d31fcff3c6e1f775926ba5eb13cd790"
}, },
@ -1123,7 +1123,7 @@
"post_title": "Product Editor Guidelines - Groups", "post_title": "Product Editor Guidelines - Groups",
"menu_title": "Groups", "menu_title": "Groups",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/ux-guidelines-product-editor/product-editor-form-groups.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/ux-guidelines-product-editor/product-editor-form-groups.md",
"hash": "798c7cf96dd1a88be7a7763dae751dafa81acf0f0fba65a868d5ebe875ed75ea", "hash": "70a01fcd0096461538f9071ea19c8c335f186c922b48e8c88a30fc874ce1cd81",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/ux-guidelines-product-editor/product-editor-form-groups.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/ux-guidelines-product-editor/product-editor-form-groups.md",
"id": "03000dc9341d0d55a113c506e6e0bc87c98e3e1e", "id": "03000dc9341d0d55a113c506e6e0bc87c98e3e1e",
"links": { "links": {
@ -1266,5 +1266,5 @@
"categories": [] "categories": []
} }
], ],
"hash": "556bb0eab0e99ed385dbc32b96008add0b64f01888d4aae6f7051345aae045cc" "hash": "a0932041c53c24ecf0a04c1163d796fbcd204a8e940fa8664fadea0c4bdea153"
} }

View File

@ -49,7 +49,7 @@ If a tab doesn't contain any sections, it won't be shown to merchants.
- **General:** Essential product information, including the name, image, and description. This tab is also where key features live for non-standard product types: downloads, groups, links, etc. - **General:** Essential product information, including the name, image, and description. This tab is also where key features live for non-standard product types: downloads, groups, links, etc.
- **Organization:** This tab contains all the data used to organize and categorize product information: from categories to attributes. Best for extensions that provide new ways to describe products, e.g., product identifiers, statuses, special tags, etc. - **Organization:** This tab contains all the data used to organize and categorize product information: from categories to attributes. Best for extensions that provide new ways to describe products, e.g., product identifiers, statuses, special tags, etc.
- **Pricing:** List price, sale price, and tax options. Best for extensions that allow merchants to set up additional payment methods (e.g., Subscriptions) or add advanced pricing schemes, like wholesale. - **Pricing:** Regular price, sale price, and tax options. Best for extensions that allow merchants to set up additional payment methods (e.g., Subscriptions) or add advanced pricing schemes, like wholesale.
- **Inventory:** Basic inventory settings and stock management options. Here merchants come to update the quantity at hand or mark the product as out of stock. Best for extensions that enable conditional inventory management, dropshipping options, or various restrictions. - **Inventory:** Basic inventory settings and stock management options. Here merchants come to update the quantity at hand or mark the product as out of stock. Best for extensions that enable conditional inventory management, dropshipping options, or various restrictions.
- **Shipping:** All the information merchants need to enter to present customers with accurate shipping rates at checkout. Best for physical product details that may impact shipping (e.g. capacity or volume), additional shipping carrier settings, or custom shipping options. - **Shipping:** All the information merchants need to enter to present customers with accurate shipping rates at checkout. Best for physical product details that may impact shipping (e.g. capacity or volume), additional shipping carrier settings, or custom shipping options.
- **Variations:** Contains variation options and product variations. - **Variations:** Contains variation options and product variations.
@ -68,11 +68,11 @@ See the guide below for some practical examples.
#### Product code extension #### Product code extension
##### What it does ##### What code extension does
The extension allows merchants to enter a product identifier, such as ISBN, EAN, or UPC. The extension allows merchants to enter a product identifier, such as ISBN, EAN, or UPC.
##### Our recommendations ##### Our recommendations about code extension
The identifier is a single piece of information that helps merchants describe and categorize the product across their store and other sales channels. It's best suited to be added as a field in the Product catalog section in the Organization group. The identifier is a single piece of information that helps merchants describe and categorize the product across their store and other sales channels. It's best suited to be added as a field in the Product catalog section in the Organization group.
@ -80,11 +80,11 @@ The identifier is a single piece of information that helps merchants describe an
#### Ticket extension #### Ticket extension
##### What it does ##### What ticket extension does
Merchants can set up and sell tickets with advanced settings, such as unique input fields, expiration dates, restrictions, tiers, and more. Merchants can set up and sell tickets with advanced settings, such as unique input fields, expiration dates, restrictions, tiers, and more.
##### Our recommendations ##### Our recommendations about ticket extension
With so much advanced functionality, the plugin would best register a new product type and define the structure and appearance of the product form. This could include the tabs at the top of the screen, the subgroups and sections inside, and the default values. With so much advanced functionality, the plugin would best register a new product type and define the structure and appearance of the product form. This could include the tabs at the top of the screen, the subgroups and sections inside, and the default values.
@ -96,12 +96,12 @@ With so much advanced functionality, the plugin would best register a new produc
Fields are the simplest type of extension. They let users add extra product information, replace or manage the visibility of other fields assigned to a specific product type, and control the contents of other fields. Fields are the simplest type of extension. They let users add extra product information, replace or manage the visibility of other fields assigned to a specific product type, and control the contents of other fields.
**What they *are* for:** **What they _are_ for:**
- Single-field, supplementary features - Single-field, supplementary features
- Showing or hiding form elements depending on specific conditions - Showing or hiding form elements depending on specific conditions
**What they *aren't* for:** **What they _aren't_ for:**
- Multi-field or multi-step forms - Multi-field or multi-step forms
- Complex tables, e.g., permissions, restrictions, shipping volumes, etc - Complex tables, e.g., permissions, restrictions, shipping volumes, etc
@ -121,13 +121,13 @@ Field extensions should always be logically related to the form area they are in
Subsections add extra fields to existing form groups. They are small forms with a low to medium level of complexity. This interface location works best for extensions that add extra features that build off an existing Woo functionality. Subsections add extra fields to existing form groups. They are small forms with a low to medium level of complexity. This interface location works best for extensions that add extra features that build off an existing Woo functionality.
**What they *are* for:** **What they _are_ for:**
- Relevant features that can be crucial to merchants' product creation flow - Relevant features that can be crucial to merchants' product creation flow
- 2-5 field forms with simple functionality, e.g., dimensions or tax settings - 2-5 field forms with simple functionality, e.g., dimensions or tax settings
- Lists of items, e.g., attachments, channels, or accounts - Lists of items, e.g., attachments, channels, or accounts
**What they *aren't* for:** **What they _aren't_ for:**
- Simple extensions with 1-2 fields - Simple extensions with 1-2 fields
- Multi-step forms and complex tables - Multi-step forms and complex tables
@ -149,13 +149,13 @@ If you're developing an extension that allows merchants to upload 360 images or
Sections are significant parts of the form that may consist of multiple subsections and fields. They should be used sparsely throughout the form, so merchants are not overwhelmed with options while filling out the information about their products. Sections are significant parts of the form that may consist of multiple subsections and fields. They should be used sparsely throughout the form, so merchants are not overwhelmed with options while filling out the information about their products.
**What they *are* for:** **What they _are_ for:**
- Complex forms with multiple fields, tables, and list items - Complex forms with multiple fields, tables, and list items
- Standalone features that don't build off of anything else - Standalone features that don't build off of anything else
- Extensions that rely on user-created items, such as tags or attributes - Extensions that rely on user-created items, such as tags or attributes
**What they *aren't* for:** **What they _aren't_ for:**
- Simple extensions with 1-2 fields - Simple extensions with 1-2 fields
- Read-only descriptions, setup guides, and advertisements - Read-only descriptions, setup guides, and advertisements
@ -171,7 +171,7 @@ If you're working on an extension that allows merchants to offer discounts based
- Managing product warranty options - Managing product warranty options
- Creating product packages and bundles - Creating product packages and bundles
### Top bar (header) *(future feature)* ### Top bar (header) _(future feature)_
![Top bar example](https://developer.woocommerce.com/wp-content/uploads/2023/12/product-editor-ext-guidelines-top-bar.png) ![Top bar example](https://developer.woocommerce.com/wp-content/uploads/2023/12/product-editor-ext-guidelines-top-bar.png)
@ -187,7 +187,7 @@ For example, top bar extensions can be used to:
Depending on their roles, top bar extensions can be displayed in either a **popover** or a **modal**. Depending on their roles, top bar extensions can be displayed in either a **popover** or a **modal**.
### Dialog extensions *(future feature)* ### Dialog extensions _(future feature)_
![Dialog example](https://developer.woocommerce.com/wp-content/uploads/2023/12/product-editor-ext-guidelines-dialog-extensions.png) ![Dialog example](https://developer.woocommerce.com/wp-content/uploads/2023/12/product-editor-ext-guidelines-dialog-extensions.png)
@ -195,13 +195,13 @@ Dialog extensions differ from other extensions as they are unrelated to any sect
Dialogs can have different sizes (small, medium, large, or custom) and trigger locations (text or icon button anywhere in the form or in the form's top bar). Dialogs can have different sizes (small, medium, large, or custom) and trigger locations (text or icon button anywhere in the form or in the form's top bar).
**What they *are* for:** **What they _are_ for:**
- Focused experiences that require taking over most of the screen - Focused experiences that require taking over most of the screen
- Advanced configuration and setup flows - Advanced configuration and setup flows
- Dedicated content embedded from a third-party service - Dedicated content embedded from a third-party service
**What they *aren't* for:** **What they _aren't_ for:**
- Single-field features or simple settings screens - Single-field features or simple settings screens
- Small functionalities that could fit within the form - Small functionalities that could fit within the form
@ -230,4 +230,3 @@ Custom product types include niche and specific use cases, such as bookings, tic
- Your extension consists of several different form sections scattered across several different tabs - Your extension consists of several different form sections scattered across several different tabs
- Using just your extension, merchants can completely a product - Using just your extension, merchants can completely a product
- You want to help merchants create products faster and automate some of their work - You want to help merchants create products faster and automate some of their work

View File

@ -11,7 +11,7 @@ If a tab doesn't contain any sections, it won't be shown to merchants.
- **General:** Essential product information, including the name, image, and description. This tab is also where key features live for non-standard product types: downloads, groups, links, etc. - **General:** Essential product information, including the name, image, and description. This tab is also where key features live for non-standard product types: downloads, groups, links, etc.
- **Organization:** This tab contains all the data used to organize and categorize product information: from categories to attributes. Best for extensions that provide new ways to describe products, e.g., product identifiers, statuses, special tags, etc. - **Organization:** This tab contains all the data used to organize and categorize product information: from categories to attributes. Best for extensions that provide new ways to describe products, e.g., product identifiers, statuses, special tags, etc.
- **Pricing:** List price, sale price, and tax options. Best for extensions that allow merchants to set up additional payment methods (e.g., Subscriptions) or add advanced pricing schemes, like wholesale. - **Pricing:** Regular price, sale price, and tax options. Best for extensions that allow merchants to set up additional payment methods (e.g., Subscriptions) or add advanced pricing schemes, like wholesale.
- **Inventory:** Basic inventory settings and stock management options. Here merchants come to update the quantity at hand or mark the product as out of stock. Best for extensions that enable conditional inventory management, dropshipping options, or various restrictions. - **Inventory:** Basic inventory settings and stock management options. Here merchants come to update the quantity at hand or mark the product as out of stock. Best for extensions that enable conditional inventory management, dropshipping options, or various restrictions.
- **Shipping:** All the information merchants need to enter to present customers with accurate shipping rates at checkout. Best for physical product details that may impact shipping (e.g. capacity or volume), additional shipping carrier settings, or custom shipping options. - **Shipping:** All the information merchants need to enter to present customers with accurate shipping rates at checkout. Best for physical product details that may impact shipping (e.g. capacity or volume), additional shipping carrier settings, or custom shipping options.
- **Variations:** Contains variation options and product variations. - **Variations:** Contains variation options and product variations.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: enhancement
Replace copy: List Price to Regular Price

View File

@ -68,7 +68,7 @@ export function Edit( {
if ( listPrice ) { if ( listPrice ) {
if ( listPrice < 0 ) { if ( listPrice < 0 ) {
return __( return __(
'List price must be greater than or equals to zero.', 'Regular price must be greater than or equals to zero.',
'woocommerce' 'woocommerce'
); );
} }
@ -77,7 +77,7 @@ export function Edit( {
listPrice <= Number.parseFloat( salePrice ) listPrice <= Number.parseFloat( salePrice )
) { ) {
return __( return __(
'List price must be greater than the sale price.', 'Regular price must be greater than the sale price.',
'woocommerce' 'woocommerce'
); );
} }

View File

@ -70,7 +70,7 @@ export function Edit( {
listPrice <= Number.parseFloat( salePrice ) listPrice <= Number.parseFloat( salePrice )
) { ) {
return __( return __(
'Sale price must be lower than the list price.', 'Sale price must be lower than the regular price.',
'woocommerce' 'woocommerce'
); );
} }

View File

@ -87,7 +87,7 @@ export function PricingMenuItem( {
) } ) }
renderContent={ () => ( renderContent={ () => (
<div className="components-dropdown-menu__menu"> <div className="components-dropdown-menu__menu">
<MenuGroup label={ __( 'List price', 'woocommerce' ) }> <MenuGroup label={ __( 'Regular price', 'woocommerce' ) }>
<SetListPriceMenuItem <SetListPriceMenuItem
selection={ selection } selection={ selection }
onChange={ onChange } onChange={ onChange }
@ -134,7 +134,7 @@ export function PricingMenuItem( {
onClose(); onClose();
} } } }
> >
{ __( 'Increase list price', 'woocommerce' ) } { __( 'Increase regular price', 'woocommerce' ) }
</MenuItem> </MenuItem>
<MenuItem <MenuItem
onClick={ () => { onClick={ () => {
@ -178,7 +178,7 @@ export function PricingMenuItem( {
onClose(); onClose();
} } } }
> >
{ __( 'Decrease list price', 'woocommerce' ) } { __( 'Decrease regular price', 'woocommerce' ) }
</MenuItem> </MenuItem>
</MenuGroup> </MenuGroup>
<MenuGroup label={ __( 'Sale price', 'woocommerce' ) }> <MenuGroup label={ __( 'Sale price', 'woocommerce' ) }>

View File

@ -46,7 +46,7 @@ export function SetListPriceMenuItem( {
onClose(); onClose();
} } } }
> >
{ __( 'Set list price', 'woocommerce' ) } { __( 'Set regular price', 'woocommerce' ) }
</MenuItem> </MenuItem>
); );
} }

View File

@ -72,7 +72,7 @@ describe( 'MultipleUpdateMenu', () => {
); );
fireEvent.click( getByRole( 'button', { name: 'Quick update' } ) ); fireEvent.click( getByRole( 'button', { name: 'Quick update' } ) );
expect( queryByText( 'Update stock' ) ).toBeInTheDocument(); expect( queryByText( 'Update stock' ) ).toBeInTheDocument();
expect( queryByText( 'Set list price' ) ).toBeInTheDocument(); expect( queryByText( 'Set regular price' ) ).toBeInTheDocument();
expect( queryByText( 'Toggle visibility' ) ).toBeInTheDocument(); expect( queryByText( 'Toggle visibility' ) ).toBeInTheDocument();
} ); } );

View File

@ -98,7 +98,7 @@ export const PricingListField: React.FC< PricingListFieldProps > = ( {
<InputControl <InputControl
{ ...regularPriceProps } { ...regularPriceProps }
name="regular_price" name="regular_price"
label={ __( 'List price', 'woocommerce' ) } label={ __( 'Regular price', 'woocommerce' ) }
value={ formatCurrencyDisplayValue( value={ formatCurrencyDisplayValue(
String( regularPriceProps?.value ), String( regularPriceProps?.value ),
currencyConfig, currencyConfig,

View File

@ -119,7 +119,7 @@ export const validate = (
parseFloat( values?.regular_price ) ) parseFloat( values?.regular_price ) )
) { ) {
errors.sale_price = __( errors.sale_price = __(
'Sale price cannot be equal to or higher than list price.', 'Sale price cannot be equal to or higher than regular price.',
'woocommerce' 'woocommerce'
); );
} }

View File

@ -0,0 +1,4 @@
Significance: minor
Type: enhancement
Replace copy: List Price to Regular Price

View File

@ -227,7 +227,7 @@ class SimpleProductTemplate extends AbstractProductFormTemplate implements Produ
'order' => 10, 'order' => 10,
'attributes' => array( 'attributes' => array(
'name' => 'regular_price', 'name' => 'regular_price',
'label' => __( 'List price', 'woocommerce' ), 'label' => __( 'Regular price', 'woocommerce' ),
'help' => $is_calc_taxes_enabled ? null : sprintf( 'help' => $is_calc_taxes_enabled ? null : sprintf(
/* translators: %1$s: store settings link opening tag. %2$s: store settings link closing tag.*/ /* translators: %1$s: store settings link opening tag. %2$s: store settings link closing tag.*/
__( 'Per your %1$sstore settings%2$s, taxes are not enabled.', 'woocommerce' ), __( 'Per your %1$sstore settings%2$s, taxes are not enabled.', 'woocommerce' ),