Fix/37502: Correct spelling errors. (#37887)

* change reference of Catpure to Capture

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>

* change reference of expicitly to explicitly

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>

* change reference 'cutted' to 'cut'

* change reference 'determening' to 'determining'

* change reference 'retreive' to 'retrieve'

* change reference 'neccessary' to 'necessary'

* change reference 'Fitler' to 'Filter'

* change reference of "seperate" to "separate"

Co-Authored-By: Ankit K Gupta <ankit.himcs@gmail.com>

* change reference of "wether" to "whether"

Co-Authored-By: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com>

* change reference of "staus" to "status"

* change reference of "retrive" to "retrieve"

* change references of "gatways" to "gateways"

* change references of "existant" to "existent"

* change reference of "requries" to "requires"

* change reference of "configuation" to "configuration"

* change reference of "processsing" to "processing"

* change reference of "represenation" to "representation"

* change reference of "dimentions" to "dimensions"

* change references of "reigster" to "register"

* change reference of "colum" to "column"

* change reference of "transtions" to "transitions"

* change references of "intially" to "initially"

* change references of "orignal" to "original"

* change references of "deprected" to "deprecated"

* change references of "paramter" to "parameter"

* change reference of "intance" to "instance"

* change reference of "elemets" to "elements"

* change references of "funcitons" to "functions"

* change reference of "specificed" to "specified"

* change references of "atributes" to "attributes"

* change reference of "tast" to "task"

* change reference of "chaning" to "changing"

* change reference of "retreiving" to "retrieving"

* change reference of "caluclation" to "calculation"

* change references of "Invaid" to "Invalid"

* change references of "paramaters" to "parameters"

* change reference of "Additonal" to "Additional"

* change reference of "teh" to "the"

* change reference of "evalutes" to "evaluates"

* change reference of "addedd" to "added"

* change reference of "excempt" to "exempt"

* change reference of "sequencially" to "sequentially"

* change reference of "previos" to "previous"

* change reference of "elegible" to "eligible"

* change references of "Boostrap" to "Bootstrap"

* change references of "compability" to "compatibility"

* change reference of "heirarchy" to "hierarchy"

* change references of "visibilty" to "visibility"

* change reference of "comparsion" to "comparison"

* change reference of "capabilties" to "capabilities"

* change reference of "datatores" to "datastores"

* change reference of "occured" to "occurred"

* change reference of "coresponding" to "corresponding"

* change references of "thier" to "their"

* change reference of "sucessfully" to "successfully"

* change reference of "insde" to "inside"

* change reference of "nagivation" to "navigation"

* change references of "visiblity" to "visibility"

* change reference of "documentaiton" to "documentation"

* change reference of "anayltics" to "analytics"

* change reference of "intalling" to "installing"

* change reference of "mininum" to "minimum"

* change references of "intial" to "initial"

* change reference of "Feld" to "Field"

* change reference of "taks" to "task"

* change reference of "trasnfer" to "transfer"

* change reference of "respone" to "response"

* change reference of "Extenstions" to "Extensions"

* change reference of "detault" to "default"

* change reference of "simultanious" to "simultaneous"

* change reference of "overides" to "overrides"

* change references of "Indvidual" to "Individual"

* change reference of "refering" to "referring"

* change reference of "aginst" to "against"

* change reference of "execuatable" to "executable"

* change reference of "repsonse" to "response"

* change reference of "documention" to "documentation"

* change reference of "asumed" to "assumed"

* change reference of "Minium" to "Minimum"

* change reference of "unqiue" to "unique"

* change references of "existance" to "existence"

* change reference of "compatability" to "compatibility"

* change reference of "Taxnomy" to "Taxonomy"

* change reference of "quering" to "querying"

* change reference of "retrun" to "return"

* change reference of "informations" to "information"

Co-Authored-By: Viktor Szépe <viktor@szepe.net>

* Add changelog

* Add changelog

* Fix typo

---------

Co-authored-by: Vikram  <93216400+vikrampm1@users.noreply.github.com>
Co-authored-by: Ankit K Gupta <ankit.himcs@gmail.com>
Co-authored-by: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
This commit is contained in:
Jeffrey Paul 2023-05-08 07:55:09 +00:00 committed by GitHub
parent 934ef52092
commit df0583f9b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
122 changed files with 167 additions and 147 deletions

View File

@ -135,7 +135,7 @@ function get_latest_version_with_release() {
} }
/** /**
* Function to retreive the sha1 reference for a given branch name. * Function to retrieve the sha1 reference for a given branch name.
* *
* @param string $branch The name of the branch. * @param string $branch The name of the branch.
* @return string Returns the name of the branch, or a falsey value on error. * @return string Returns the name of the branch, or a falsey value on error.

View File

@ -54,7 +54,7 @@
* Fix - Prevent possible warning arising from use of woocommerce_wp_* family of functions. [#37026](https://github.com/woocommerce/woocommerce/pull/37026) * Fix - Prevent possible warning arising from use of woocommerce_wp_* family of functions. [#37026](https://github.com/woocommerce/woocommerce/pull/37026)
* Fix - Record values for toggled checkboxes/features in settings [#37242](https://github.com/woocommerce/woocommerce/pull/37242) * Fix - Record values for toggled checkboxes/features in settings [#37242](https://github.com/woocommerce/woocommerce/pull/37242)
* Fix - Restore the sort order when orders are cached. [#36650](https://github.com/woocommerce/woocommerce/pull/36650) * Fix - Restore the sort order when orders are cached. [#36650](https://github.com/woocommerce/woocommerce/pull/36650)
* Fix - Treat order as seperate resource when validating for webhook since it's not necessarily a CPT anymore. [#36650](https://github.com/woocommerce/woocommerce/pull/36650) * Fix - Treat order as separate resource when validating for webhook since it's not necessarily a CPT anymore. [#36650](https://github.com/woocommerce/woocommerce/pull/36650)
* Fix - Update Customers report with latest user data after editing user. [#37237](https://github.com/woocommerce/woocommerce/pull/37237) * Fix - Update Customers report with latest user data after editing user. [#37237](https://github.com/woocommerce/woocommerce/pull/37237)
* Add - Add "Create a new campaign" modal in Campaigns card in Multichannel Marketing page. [#37044](https://github.com/woocommerce/woocommerce/pull/37044) * Add - Add "Create a new campaign" modal in Campaigns card in Multichannel Marketing page. [#37044](https://github.com/woocommerce/woocommerce/pull/37044)
* Add - Add a cache for orders, to use when custom order tables are enabled [#35014](https://github.com/woocommerce/woocommerce/pull/35014) * Add - Add a cache for orders, to use when custom order tables are enabled [#35014](https://github.com/woocommerce/woocommerce/pull/35014)
@ -432,7 +432,7 @@
* Tweak - Resolve an error in the product tracking code by testing to see if the `post_type` query var is set before checking its value. [#34501](https://github.com/woocommerce/woocommerce/pull/34501) * Tweak - Resolve an error in the product tracking code by testing to see if the `post_type` query var is set before checking its value. [#34501](https://github.com/woocommerce/woocommerce/pull/34501)
* Tweak - Simplify wording within the customer emails for on-hold orders. [#31886](https://github.com/woocommerce/woocommerce/pull/31886) * Tweak - Simplify wording within the customer emails for on-hold orders. [#31886](https://github.com/woocommerce/woocommerce/pull/31886)
* Tweak - WooCommerce has now been tested up to WordPress 6.1.x. [#35985](https://github.com/woocommerce/woocommerce/pull/35985) * Tweak - WooCommerce has now been tested up to WordPress 6.1.x. [#35985](https://github.com/woocommerce/woocommerce/pull/35985)
* Performance - Split CALC_FOUND_ROW query into seperate count query for better performance. [#35468](https://github.com/woocommerce/woocommerce/pull/35468) * Performance - Split CALC_FOUND_ROW query into separate count query for better performance. [#35468](https://github.com/woocommerce/woocommerce/pull/35468)
* Enhancement - Add a bottom padding to the whole form [#35721](https://github.com/woocommerce/woocommerce/pull/35721) * Enhancement - Add a bottom padding to the whole form [#35721](https://github.com/woocommerce/woocommerce/pull/35721)
* Enhancement - Add a confirmation modal when the user tries to navigate away with unsaved changes [#35625](https://github.com/woocommerce/woocommerce/pull/35625) * Enhancement - Add a confirmation modal when the user tries to navigate away with unsaved changes [#35625](https://github.com/woocommerce/woocommerce/pull/35625)
* Enhancement - Add a default placeholder title for newly added attributes and always show remove button for attributes [#35904](https://github.com/woocommerce/woocommerce/pull/35904) * Enhancement - Add a default placeholder title for newly added attributes and always show remove button for attributes [#35904](https://github.com/woocommerce/woocommerce/pull/35904)
@ -3371,7 +3371,7 @@
* Fix - Add protection around func_get_args_call for backwards compatibility. #28677 * Fix - Add protection around func_get_args_call for backwards compatibility. #28677
* Fix - Restore stock_status in REST API V3 response. #28731 * Fix - Restore stock_status in REST API V3 response. #28731
* Fix - Revert some of the changes related to perf enhancements (27735) as it was breaking stock_status filter. #28745 * Fix - Revert some of the changes related to perf enhancements (27735) as it was breaking stock_status filter. #28745
* Dev - Hook for intializing price slider in frontend. #28014 * Dev - Hook for initializing price slider in frontend. #28014
* Dev - Add support for running a custom initialization script for tests. #28041 * Dev - Add support for running a custom initialization script for tests. #28041
* Dev - Use the coenjacobs/mozart package to renamespace vendor packages. #28147 * Dev - Use the coenjacobs/mozart package to renamespace vendor packages. #28147
* Dev - Documentation for `wc_get_container`. #28269 * Dev - Documentation for `wc_get_container`. #28269
@ -5290,7 +5290,7 @@
* Fix - Fix edge case where `get_plugins` would not have the custom WooCommerce plugin headers if `get_plugins` was called early. #21669 * Fix - Fix edge case where `get_plugins` would not have the custom WooCommerce plugin headers if `get_plugins` was called early. #21669
* Fix - Prevent PHP warning when deprecated user meta starts with uppercase. #21943 * Fix - Prevent PHP warning when deprecated user meta starts with uppercase. #21943
* Fix - Fixed support for multiple query parameters translated to meta queries via REST API requests. #22108 * Fix - Fixed support for multiple query parameters translated to meta queries via REST API requests. #22108
* Fix - Prevent PHP errors when trying to access non-existant report tabs. #22183 * Fix - Prevent PHP errors when trying to access non-existent report tabs. #22183
* Fix - Filter by attributes dropdown placeholder text should not be wrapped in quotes. #22185 * Fix - Filter by attributes dropdown placeholder text should not be wrapped in quotes. #22185
* Fix - Apply sale price until end of closing sale date. #22189 * Fix - Apply sale price until end of closing sale date. #22189
* Fix - Allow empty schema again when registering a custom field for the API. #22204 * Fix - Allow empty schema again when registering a custom field for the API. #22204
@ -6612,7 +6612,7 @@
* Removed internal scroll from log viewer. * Removed internal scroll from log viewer.
* Add reply-to to admin emails. * Add reply-to to admin emails.
* Improved the zone setup flow. * Improved the zone setup flow.
* Made wc_get_wildcard_postcodes return the orignal postcode plus * since wildcards should match empty strings too. * Made wc_get_wildcard_postcodes return the original postcode plus * since wildcards should match empty strings too.
* Use all paid statuses in $customer->get_total_spent(). * Use all paid statuses in $customer->get_total_spent().
* Move location of billing email field to work with password managers. * Move location of billing email field to work with password managers.
* Option to restrict selling locations by country. * Option to restrict selling locations by country.
@ -8122,7 +8122,7 @@
* Tweak - Flat rate shipping support for percentage factor of additional costs. * Tweak - Flat rate shipping support for percentage factor of additional costs.
* Tweak - local delivery _ pattern matching for postcodes. e.g. NG1___ would match NG1 1AA but not NG10 1AA. * Tweak - local delivery _ pattern matching for postcodes. e.g. NG1___ would match NG1 1AA but not NG10 1AA.
* Tweak - Improved layered nav OR count logic * Tweak - Improved layered nav OR count logic
* Tweak - Make shipping methods check if taxable, so when customer is VAT excempt taxes are not included in price. * Tweak - Make shipping methods check if taxable, so when customer is VAT exempt taxes are not included in price.
* Tweak - Coupon in admin bar new menu #3974 * Tweak - Coupon in admin bar new menu #3974
* Tweak - Shortcode tag filters + updated menu names to make white labelling easier. * Tweak - Shortcode tag filters + updated menu names to make white labelling easier.
* Tweak - Removed placeholder polyfill. Use this plugin to replace functionality if required: https://wordpress.org/plugins/html5-placeholder-polyfill/ * Tweak - Removed placeholder polyfill. Use this plugin to replace functionality if required: https://wordpress.org/plugins/html5-placeholder-polyfill/

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Correct spelling errors

View File

@ -94,7 +94,7 @@ Name | Type | Default | Description
`legendPosition` | One of: 'bottom', 'side', 'top', 'hidden' | `null` | Position the legend must be displayed in. If it's not defined, it's calculated depending on the viewport width and the mode `legendPosition` | One of: 'bottom', 'side', 'top', 'hidden' | `null` | Position the legend must be displayed in. If it's not defined, it's calculated depending on the viewport width and the mode
`legendTotals` | Object | `null` | Values to overwrite the legend totals. If not defined, the sum of all line values will be used `legendTotals` | Object | `null` | Values to overwrite the legend totals. If not defined, the sum of all line values will be used
`screenReaderFormat` | One of type: string, func | `'%B %-d, %Y'` | A datetime formatting string or overriding function to format the screen reader labels `screenReaderFormat` | One of type: string, func | `'%B %-d, %Y'` | A datetime formatting string or overriding function to format the screen reader labels
`showHeaderControls` | Boolean | `true` | Wether header UI controls must be displayed `showHeaderControls` | Boolean | `true` | Whether header UI controls must be displayed
`title` | String | `null` | A title describing this chart `title` | String | `null` | A title describing this chart
`tooltipLabelFormat` | One of type: string, func | `'%B %-d, %Y'` | A datetime formatting string or overriding function to format the tooltip label `tooltipLabelFormat` | One of type: string, func | `'%B %-d, %Y'` | A datetime formatting string or overriding function to format the tooltip label
`tooltipValueFormat` | One of type: string, func | `','` | A number formatting string or function to format the value displayed in the tooltips `tooltipValueFormat` | One of type: string, func | `','` | A number formatting string or function to format the value displayed in the tooltips

View File

@ -577,7 +577,7 @@ Chart.propTypes = {
PropTypes.func, PropTypes.func,
] ), ] ),
/** /**
* Wether header UI controls must be displayed. * Whether header UI controls must be displayed.
*/ */
showHeaderControls: PropTypes.bool, showHeaderControls: PropTypes.bool,
/** /**

View File

@ -65,8 +65,8 @@ The `config` prop has the following structure:
- `label`: String - A label above the filter selector. - `label`: String - A label above the filter selector.
- `staticParams`: Array - Url parameters to persist when selecting a new filter. - `staticParams`: Array - Url parameters to persist when selecting a new filter.
- `param`: String - The url paramter this filter will modify. - `param`: String - The url parameter this filter will modify.
- `defaultValue`: String - The default paramter value to use instead of 'all'. - `defaultValue`: String - The default parameter value to use instead of 'all'.
- `showFilters`: Function - Determine if the filter should be shown. Supply a function with the query object as an argument returning a boolean. - `showFilters`: Function - Determine if the filter should be shown. Supply a function with the query object as an argument returning a boolean.
- `filters`: Array - Array of filter objects. - `filters`: Array - Array of filter objects.

View File

@ -374,11 +374,11 @@ FilterPicker.propTypes = {
*/ */
staticParams: PropTypes.array.isRequired, staticParams: PropTypes.array.isRequired,
/** /**
* The url paramter this filter will modify. * The url parameter this filter will modify.
*/ */
param: PropTypes.string.isRequired, param: PropTypes.string.isRequired,
/** /**
* The default paramter value to use instead of 'all'. * The default parameter value to use instead of 'all'.
*/ */
defaultValue: PropTypes.string, defaultValue: PropTypes.string,
/** /**

View File

@ -45,7 +45,7 @@ export const EditorWritingFlow = ( {
}; };
} ); } );
// This is a workaround to prevent focusing the block on intialization. // This is a workaround to prevent focusing the block on initialization.
// Changing to a mode other than "edit" ensures that no initial position // Changing to a mode other than "edit" ensures that no initial position
// is found and no element gets subsequently focused. // is found and no element gets subsequently focused.
// See https://github.com/WordPress/gutenberg/blob/411b6eee8376e31bf9db4c15c92a80524ae38e9b/packages/block-editor/src/components/block-list/use-block-props/use-focus-first-element.js#L42 // See https://github.com/WordPress/gutenberg/blob/411b6eee8376e31bf9db4c15c92a80524ae38e9b/packages/block-editor/src/components/block-list/use-block-props/use-focus-first-element.js#L42

View File

@ -153,7 +153,7 @@ describe( 'buildTermsTree', () => {
] ); ] );
} ); } );
test( 'should return a tree of items, with orphan categories appended to the end, with children of thier own', () => { test( 'should return a tree of items, with orphan categories appended to the end, with children of their own', () => {
const filteredList = [ const filteredList = [
{ id: 1, name: 'Apricots', parent: 0 }, { id: 1, name: 'Apricots', parent: 0 },
{ id: 3, name: 'Elderberry', parent: 2 }, { id: 3, name: 'Elderberry', parent: 2 },

View File

@ -110,7 +110,7 @@ export const Sortable = ( {
// Items before the current item cause a one off error when // Items before the current item cause a one off error when
// removed from the old array and spliced into the new array. // removed from the old array and spliced into the new array.
// TODO: Issue with dragging into same position having to do with isBefore returning true intially. // TODO: Issue with dragging into same position having to do with isBefore returning true initially.
let targetIndex = dragIndex < index ? index : index + 1; let targetIndex = dragIndex < index ? index : index + 1;
if ( isBefore( event, isHorizontal ) ) { if ( isBefore( event, isHorizontal ) ) {
targetIndex--; targetIndex--;

View File

@ -61,7 +61,7 @@ Name | Type | Default | Description
`ids` | Array | `null` | A list of IDs, matching to the row list so that ids[ 0 ] contains the object ID for the object displayed in row[ 0 ] `ids` | Array | `null` | A list of IDs, matching to the row list so that ids[ 0 ] contains the object ID for the object displayed in row[ 0 ]
`isLoading` | Boolean | `false` | Defines if the table contents are loading. It will display `TablePlaceholder` component instead of `Table` if that's the case `isLoading` | Boolean | `false` | Defines if the table contents are loading. It will display `TablePlaceholder` component instead of `Table` if that's the case
`onQueryChange` | Function | `noop` | A function which returns a callback function to update the query string for a given `param` `onQueryChange` | Function | `noop` | A function which returns a callback function to update the query string for a given `param`
`onColumnsChange` | Function | `noop` | A function which returns a callback function which is called upon the user changing the visiblity of columns `onColumnsChange` | Function | `noop` | A function which returns a callback function which is called upon the user changing the visibility of columns
`onSearch` | Function | `noop` | A function which is called upon the user searching in the table header `onSearch` | Function | `noop` | A function which is called upon the user searching in the table header
`onSort` | Function | `undefined` | A function which is called upon the user changing the sorting of the table `onSort` | Function | `undefined` | A function which is called upon the user changing the sorting of the table
`downloadable` | Boolean | `false` | Whether the table must be downloadable. If true, the download button will appear `downloadable` | Boolean | `false` | Whether the table must be downloadable. If true, the download button will appear

View File

@ -158,7 +158,7 @@ export type TableCardProps = CommonTableProps & {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
onQueryChange?: ( param: string ) => ( ...props: any ) => void; onQueryChange?: ( param: string ) => ( ...props: any ) => void;
/** /**
* A function which returns a callback function which is called upon the user changing the visiblity of columns. * A function which returns a callback function which is called upon the user changing the visibility of columns.
*/ */
onColumnsChange?: ( showCols: Array< string >, key?: string ) => void; onColumnsChange?: ( showCols: Array< string >, key?: string ) => void;
/** /**

View File

@ -22,7 +22,7 @@
## Breaking changes ## Breaking changes
- Fix the batch fetch logic for the options data store. #7587 - Fix the batch fetch logic for the options data store. #7587
- Add backwards compability for old function format. #7688 - Add backwards compatibility for old function format. #7688
- Add console warning for inbox note contents exceeding 320 characters and add dompurify dependency. #7869 - Add console warning for inbox note contents exceeding 320 characters and add dompurify dependency. #7869
- Fix race condition in data package's options module. #7947 - Fix race condition in data package's options module. #7947
- Remove dev dependency `@woocommerce/wc-admin-settings`. #8057 - Remove dev dependency `@woocommerce/wc-admin-settings`. #8057

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Correct spelling errors

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Correct spelling errors

View File

@ -163,7 +163,7 @@ describe( 'Experimental List', () => {
} ); } );
describe( 'ExperimentalListItemCollapse', () => { describe( 'ExperimentalListItemCollapse', () => {
it( 'should not render its children intially, but an extra list footer with show text', () => { it( 'should not render its children initially, but an extra list footer with show text', () => {
const { container } = render( const { container } = render(
<ExperimentalCollapsibleList <ExperimentalCollapsibleList
collapseLabel="Show less" collapseLabel="Show less"

View File

@ -185,7 +185,7 @@ describe( 'InboxNoteCard', () => {
); );
} ); } );
it( 'should call onVisible when visiblity sensor calls it', () => { it( 'should call onVisible when visibility sensor calls it', () => {
const onVisible = jest.fn(); const onVisible = jest.fn();
const { getByText } = render( const { getByText } = render(
<InboxNoteCard <InboxNoteCard
@ -199,7 +199,7 @@ describe( 'InboxNoteCard', () => {
expect( onVisible ).toHaveBeenCalledWith( note ); expect( onVisible ).toHaveBeenCalledWith( note );
} ); } );
it( 'should call onVisible when visiblity sensor calls it, but only once', () => { it( 'should call onVisible when visibility sensor calls it, but only once', () => {
const onVisible = jest.fn(); const onVisible = jest.fn();
const { getByText } = render( const { getByText } = render(
<InboxNoteCard <InboxNoteCard

View File

@ -219,7 +219,7 @@ describe( 'Activity Panel', () => {
expect( getByText( 'Finish setup' ) ).toBeInTheDocument(); expect( getByText( 'Finish setup' ) ).toBeInTheDocument();
} ); } );
it( 'should not render the finish setup link when a user does not have capabilties', () => { it( 'should not render the finish setup link when a user does not have capabilities', () => {
useUser.mockImplementation( () => ( { useUser.mockImplementation( () => ( {
currentUserCan: () => false, currentUserCan: () => false,
} ) ); } ) );

View File

@ -45,7 +45,7 @@ class ReportFilters extends Component {
// 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 comparison 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
// trigger a CES survey for those. // trigger a CES survey for those.
const triggerCesFor = [ const triggerCesFor = [

View File

@ -138,7 +138,7 @@ const ReportTable = ( props ) => {
}; };
const filterShownHeaders = ( headers, hiddenKeys ) => { const filterShownHeaders = ( headers, hiddenKeys ) => {
// If no user preferences, set visibilty based on column default. // If no user preferences, set visibility based on column default.
if ( ! hiddenKeys ) { if ( ! hiddenKeys ) {
return headers.map( ( header ) => ( { return headers.map( ( header ) => ( {
...header, ...header,
@ -146,7 +146,7 @@ const ReportTable = ( props ) => {
} ) ); } ) );
} }
// Set visibilty based on user preferences. // Set visibility based on user preferences.
return headers.map( ( header ) => ( { return headers.map( ( header ) => ( {
...header, ...header,
visible: header.required || ! hiddenKeys.includes( header.key ), visible: header.required || ! hiddenKeys.includes( header.key ),

View File

@ -24,7 +24,7 @@ Each menu item is defined by an array containing `id`, `title`, `parent`, and `p
- `report` (string): The report's id. - `report` (string): The report's id.
- `title` (string): The title shown in the sidebar. - `title` (string): The title shown in the sidebar.
- `parent` (string): The item's parent in the navigational heirarchy. - `parent` (string): The item's parent in the navigational hierarchy.
- `path` (string): The report's relative path. - `path` (string): The report's relative path.
Next, hook into the JavaScript reports filter, `woocommerce_admin_reports_list`, to add a report component. Next, hook into the JavaScript reports filter, `woocommerce_admin_reports_list`, to add a report component.

View File

@ -1,7 +1,7 @@
Settings Settings
======= =======
The settings used to modify the way data is retreived or displayed in WooCommerce reports. The settings used to modify the way data is retrieved or displayed in WooCommerce reports.
## Extending Settings ## Extending Settings

View File

@ -48,7 +48,7 @@ const DEFAULT_SECTIONS_FILTER = 'woocommerce_dashboard_default_sections';
* @property {string} key Unique identifying string. * @property {string} key Unique identifying string.
* @property {Node} component React component to render. * @property {Node} component React component to render.
* @property {string} title Title. * @property {string} title Title.
* @property {boolean} isVisible The default visibilty. * @property {boolean} isVisible The default visibility.
* @property {Node} icon Section icon. * @property {Node} icon Section icon.
* @property {Array.<string>} hiddenBlocks Blocks that are hidden by default. * @property {Array.<string>} hiddenBlocks Blocks that are hidden by default.
*/ */

View File

@ -47,7 +47,7 @@ export const useSendMagicLink = () => {
setRequestState( SendMagicLinkStates.ERROR ); setRequestState( SendMagicLinkStates.ERROR );
createNotice( createNotice(
'error', 'error',
__( 'Sorry, an unknown error occured.', 'woocommerce' ) __( 'Sorry, an unknown error occurred.', 'woocommerce' )
); );
} }
} ) } )

View File

@ -289,7 +289,7 @@ export const getPages = () => {
container: SettingsGroup, container: SettingsGroup,
path: '/settings/:page', path: '/settings/:page',
breadcrumbs: ( { match } ) => { breadcrumbs: ( { match } ) => {
// @todo This might need to be refactored to retreive groups via data store. // @todo This might need to be refactored to retrieve groups via data store.
const settingsPages = getAdminSetting( 'settingsPages' ); const settingsPages = getAdminSetting( 'settingsPages' );
const page = settingsPages[ match.params.page ]; const page = settingsPages[ match.params.page ];
if ( ! page ) { if ( ! page ) {

View File

@ -19,7 +19,7 @@ const Item = ( { item } ) => {
// and should not be a tabbable element. // and should not be a tabbable element.
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */ /* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
// Only render a slot if a coresponding Fill exists and the item is not a category // Only render a slot if a corresponding Fill exists and the item is not a category
if ( hasFills && ! item.isCategory ) { if ( hasFills && ! item.isCategory ) {
return ( return (
<NavigationItem key={ item.id } item={ item.id }> <NavigationItem key={ item.id } item={ item.id }>

View File

@ -190,7 +190,7 @@ export const sortMenuItems = ( menuItems: Item[] ): Item[] => {
}; };
/** /**
* Get a flat tree structure of all Categories and thier children grouped by menuId * Get a flat tree structure of all Categories and their children grouped by menuId
* *
* @param {Array} menuItems Array of menu items. * @param {Array} menuItems Array of menu items.
* @param {Function} currentUserCan Callback method passed the capability to determine if a menu item is visible. * @param {Function} currentUserCan Callback method passed the capability to determine if a menu item is visible.

View File

@ -94,7 +94,7 @@ const EditProductPage: React.FC = () => {
); );
useEffect( () => { useEffect( () => {
// used for determening the wasDeletedUsingAction condition. // used for determining the wasDeletedUsingAction condition.
if ( if (
previousProductRef.current && previousProductRef.current &&
product && product &&

View File

@ -181,7 +181,7 @@ export class StoreDetails extends Component {
* `await` and performs an update aysnchronously. This means the following * `await` and performs an update aysnchronously. This means the following
* screen may not be initialized with correct profile settings. * screen may not be initialized with correct profile settings.
* *
* This comment may be removed when a refactor to wp.data datatores is complete. * This comment may be removed when a refactor to wp.data datastores is complete.
*/ */
if ( if (
region !== 'US' && region !== 'US' &&

View File

@ -71,7 +71,7 @@
} }
} }
// Temporary fix for compability with the Jetpack masterbar // Temporary fix for compatibility with the Jetpack masterbar
// See https://github.com/Automattic/jetpack/issues/9608 // See https://github.com/Automattic/jetpack/issues/9608
@include breakpoint( '<782px' ) { @include breakpoint( '<782px' ) {
.jetpack-masterbar { .jetpack-masterbar {

View File

@ -210,7 +210,7 @@ class Appearance extends Component {
this.setState( { isUpdatingLogo: false } ); this.setState( { isUpdatingLogo: false } );
createNotice( createNotice(
'success', 'success',
__( 'Store logo updated sucessfully', 'woocommerce' ) __( 'Store logo updated successfully', 'woocommerce' )
); );
this.completeStep(); this.completeStep();
} else { } else {

View File

@ -1,5 +1,5 @@
Scripts located in this directory are meant to be loaded on wp-admin pages outside the context of WooCommerce Admin, such as the post editor. Adding the script name to `wpAdminScripts` in the Webpack config will automatically build these scripts. Scripts located in this directory are meant to be loaded on wp-admin pages outside the context of WooCommerce Admin, such as the post editor. Adding the script name to `wpAdminScripts` in the Webpack config will automatically build these scripts.
Scripts must be manually enqueued with any neccessary dependencies. For example, `onboarding-homepage-notice` uses the WooCommerce navigation package: Scripts must be manually enqueued with any necessary dependencies. For example, `onboarding-homepage-notice` uses the WooCommerce navigation package:
`wp_enqueue_script( 'onboarding-homepage-notice', Loader::get_url( 'wp-scripts/onboarding-homepage-notice.js' ), array( 'wc-navigation' ) );` `wp_enqueue_script( 'onboarding-homepage-notice', Loader::get_url( 'wp-scripts/onboarding-homepage-notice.js' ), array( 'wc-navigation' ) );`

View File

@ -6,7 +6,7 @@
*/ */
/** /**
* This is a workaround to bypass intalling the gateway plugins from WP.org. * This is a workaround to bypass installing the gateway plugins from WP.org.
* This is not necessary provided your suggestion is a valid WP.org plugin. * This is not necessary provided your suggestion is a valid WP.org plugin.
* *
* @param array $response Response data. * @param array $response Response data.

View File

@ -12,7 +12,7 @@ The fastest way to get started is by creating an example plugin from WooCommerce
`WC_EXT=add-navigation-items pnpm example --filter=woocommerce/client/admin` `WC_EXT=add-navigation-items pnpm example --filter=woocommerce/client/admin`
This will create a new plugin that covers various features of the navigation and helps to register some intial items and categories within the new navigation menu. After running the command above, you can make edits directly to the files at `docs/examples/extensions/add-navigation-items` and they will be built and copied to your `wp-content/add-navigation-items` folder on save. This will create a new plugin that covers various features of the navigation and helps to register some initial items and categories within the new navigation menu. After running the command above, you can make edits directly to the files at `docs/examples/extensions/add-navigation-items` and they will be built and copied to your `wp-content/add-navigation-items` folder on save.
If you need to enable the WP Toolbar for debugging purposes in the new navigation, you can add the following filter to do so: If you need to enable the WP Toolbar for debugging purposes in the new navigation, you can add the following filter to do so:

View File

@ -32,8 +32,8 @@ $args = array(
'can_view' => 'US:CA' === wc_get_base_location(), 'can_view' => 'US:CA' === wc_get_base_location(),
'level' => 3, // Priority level shown for extended tasks. 'level' => 3, // Priority level shown for extended tasks.
'time' => __( '2 minutes', 'plugin-text-domain' ), // Time string for time to complete the task. 'time' => __( '2 minutes', 'plugin-text-domain' ), // Time string for time to complete the task.
'is_dismissable' => false, // Determine if the taks is dismissable. 'is_dismissable' => false, // Determine if the task is dismissable.
'is_snoozeable' => true, // Determine if the taks is snoozeable. 'is_snoozeable' => true, // Determine if the task is snoozeable.
'additional_info' => array( 'apples', 'oranges', 'bananas' ), // Additional info passed to the task. 'additional_info' => array( 'apples', 'oranges', 'bananas' ), // Additional info passed to the task.
) )
$task = new Task( $args ); $task = new Task( $args );

View File

@ -70,7 +70,7 @@ To disconnect from WooCommerce.com, go to `WooCommerce > Extensions > WooCommerc
## Jetpack Connection ## Jetpack Connection
Using Jetpack & WooCommerce Shipping & Tax allows us to offer additional features to new WooCommerce users as well as simplify parts of the setup process. For example, we can do automated tax calculations for certain countries, significantly simplifying the tax task. To make this work, the user needs to be connected to a WordPress.com account. This also means development and testing of these features needs to be done on a Jetpack connected site. Search the MGS & the Feld Guide for additional resources on testing Jetpack with local setups. Using Jetpack & WooCommerce Shipping & Tax allows us to offer additional features to new WooCommerce users as well as simplify parts of the setup process. For example, we can do automated tax calculations for certain countries, significantly simplifying the tax task. To make this work, the user needs to be connected to a WordPress.com account. This also means development and testing of these features needs to be done on a Jetpack connected site. Search the MGS & the Field Guide for additional resources on testing Jetpack with local setups.
We have a special Jetpack connection flow designed specifically for WooCommerce onboarding, so that the user feels that they are connecting as part of a cohesive experience. To access this flow, we have a custom Jetpack connection endpoint [/wc-admin/plugins/connect-jetpack](https://github.com/woocommerce/woocommerce/blob/feba6a8dcd55d4f5c7edc05478369c76df082293/plugins/woocommerce/src/Admin/API/Plugins.php#L395-L417). We have a special Jetpack connection flow designed specifically for WooCommerce onboarding, so that the user feels that they are connecting as part of a cohesive experience. To access this flow, we have a custom Jetpack connection endpoint [/wc-admin/plugins/connect-jetpack](https://github.com/woocommerce/woocommerce/blob/feba6a8dcd55d4f5c7edc05478369c76df082293/plugins/woocommerce/src/Admin/API/Plugins.php#L395-L417).

View File

@ -6,7 +6,7 @@ After merchants click on a recommendation, plugins from this source will then wa
### Quick start ### Quick start
Gateway suggestions are retreived from a REST API and can be added via a remote JSON data source or filtered with the `woocommerce_admin_payment_gateway_suggestion_specs` filter. Gateway suggestions are retrieved from a REST API and can be added via a remote JSON data source or filtered with the `woocommerce_admin_payment_gateway_suggestion_specs` filter.
To quickly get started with an example plugin, run the following: To quickly get started with an example plugin, run the following:
@ -22,7 +22,7 @@ If a user is not opted into marketplace suggestions or polling fails, the gatewa
## Remote Data Source Schema ## Remote Data Source Schema
The data source schema defines the recommended payment gateways and required plugins to kick of the setup process. The goal of this config is to provide the mininum amount of information possible to show a list of gateways and allow the gateways themselves to define specifics around configuration. The data source schema defines the recommended payment gateways and required plugins to kick of the setup process. The goal of this config is to provide the minimum amount of information possible to show a list of gateways and allow the gateways themselves to define specifics around configuration.
```json ```json
[ [

View File

@ -10,7 +10,7 @@ Currently, development efforts have been focused on two primary areas:
## Analytics ## Analytics
With WooCommerce installed, a new Analytics menu item is created in the wp-admin menu system. This menu item, and the reports contained insde of it are available to all wp-admin users that have the `view_woocommerce_reports` capability, so per a standard WooCommerce install this would give `shop_manager`s and `administrator`s access to the reports. With WooCommerce installed, a new Analytics menu item is created in the wp-admin menu system. This menu item, and the reports contained inside of it are available to all wp-admin users that have the `view_woocommerce_reports` capability, so per a standard WooCommerce install this would give `shop_manager`s and `administrator`s access to the reports.
Each report is quite unique with its own set of filtering options and chart types. To learn more about each individual report, please view the pages below: Each report is quite unique with its own set of filtering options and chart types. To learn more about each individual report, please view the pages below:

View File

@ -2,7 +2,7 @@
The Activity Panel aims to be a "one stop shop" for managing your store - fulfill new orders, manage product inventory, moderate reviews, and get information about running your store. The Activity Panel aims to be a "one stop shop" for managing your store - fulfill new orders, manage product inventory, moderate reviews, and get information about running your store.
Activity Panels can be accessed wherever the WooCommerce Admin nagivation bar is shown. Activity Panels can be accessed wherever the WooCommerce Admin navigation bar is shown.
![Activity Panels Tabs Overview](images/activity-panels-tabs.png) ![Activity Panels Tabs Overview](images/activity-panels-tabs.png)

View File

@ -46,7 +46,7 @@ The _Summary Number_ tab gives you a quick view at the total figure for that met
### Chart ### Chart
![Analytics Chart](analytics-basics-chart.png) ![Analytics Chart](analytics-basics-chart.png)
The charts on report pages offer quite a few options to customize the visualiztion of data. The data legend ( labeled A ) allows you to toggle the visiblity of the different data set periods. The _Interval Selector_ ( labeled B ) allows you to adjust the interval displayed in the chart. The options available here are dependent upon the length of the date range selected: The charts on report pages offer quite a few options to customize the visualiztion of data. The data legend ( labeled A ) allows you to toggle the visibility of the different data set periods. The _Interval Selector_ ( labeled B ) allows you to adjust the interval displayed in the chart. The options available here are dependent upon the length of the date range selected:
| Length of Date Range | Interval Options | | Length of Date Range | Interval Options |
|---|---| |---|---|
@ -69,10 +69,10 @@ The table which displays the detailed data on Analytics reports also has a numbe
Many columns in reports will allow you to click on the column header to sort the tabular data by that value, and to either sort by that value in ascending or descending order. Simply click the column header to sort by that value, and click it again to change between ascending and descending sort. Many columns in reports will allow you to click on the column header to sort the tabular data by that value, and to either sort by that value in ascending or descending order. Simply click the column header to sort by that value, and click it again to change between ascending and descending sort.
### Toggle Column Visiblity ### Toggle Column Visibility
![Analytics Table Column Sorting](analytics-table-column-visbility.png) ![Analytics Table Column Sorting](analytics-table-column-visbility.png)
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 visibility 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)
@ -89,4 +89,4 @@ If your selected date range results in a data set that spans more then one page
When the data displayed in the table is larger than the default single page size of 25, some pagination options will appear in the table footer area. Directional buttons, labeled `<` and `>` enable you to move backwards and forwards between pages, and a text field will allow you to jump to a specific page number. Furthermore you can change the number of rows to display per page. When the data displayed in the table is larger than the default single page size of 25, some pagination options will appear in the table footer area. Directional buttons, labeled `<` and `>` enable you to move backwards and forwards between pages, and a text field will allow you to jump to a specific page number. Furthermore you can change the number of rows to display per page.
### Table Search Box ### Table Search Box
On some reports, a search box is displayed in the table header area as well. For details on what the search box does on a given report, please refer to the associated documentaiton page for that report. On some reports, a search box is displayed in the table header area as well. For details on what the search box does on a given report, please refer to the associated documentation page for that report.

View File

@ -12,7 +12,7 @@ WooCommerce Admin is pre-configured with default settings for WooCommerce Analyt
![Excluded statuses settings](images/settings-excluded-statuses.png) ![Excluded statuses settings](images/settings-excluded-statuses.png)
In this section, statuses that are **unchecked** are **included** in anayltics reports. **Checked** statuses are **excluded**. If your store uses custom order statuses, those statuses are included in the reports by default. They will be listed in this section under `Custom Statuses` and can be excluded via the status checkbox. In this section, statuses that are **unchecked** are **included** in analytics reports. **Checked** statuses are **excluded**. If your store uses custom order statuses, those statuses are included in the reports by default. They will be listed in this section under `Custom Statuses` and can be excluded via the status checkbox.
### Default Date Range ### Default Date Range

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Correct spelling errors

View File

@ -44,7 +44,7 @@ function _wc_beta_tester_load_textdomain() {
add_action( 'plugins_loaded', '_wc_beta_tester_load_textdomain' ); add_action( 'plugins_loaded', '_wc_beta_tester_load_textdomain' );
/** /**
* Boostrap plugin. * Bootstrap plugin.
*/ */
function _wc_beta_tester_bootstrap() { function _wc_beta_tester_bootstrap() {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Correct spelling errors

View File

@ -1,4 +1,4 @@
Significance: patch Significance: patch
Type: fix Type: fix
skip k6 api order RUD tests on non-existant order when C test fails skip k6 api order RUD tests on non-existent order when C test fails

View File

@ -79,7 +79,7 @@ jQuery( function( $ ) {
} }
}; };
// Show password visiblity hover icon on woocommerce forms // Show password visibility hover icon on woocommerce forms
$( '.woocommerce form .woocommerce-Input[type="password"]' ).wrap( '<span class="password-input"></span>' ); $( '.woocommerce form .woocommerce-Input[type="password"]' ).wrap( '<span class="password-input"></span>' );
// Add 'password-input' class to the password wrapper in checkout page. // Add 'password-input' class to the password wrapper in checkout page.
$( '.woocommerce form input' ).filter(':password').parent('span').addClass('password-input'); $( '.woocommerce form input' ).filter(':password').parent('span').addClass('password-input');

View File

@ -134,7 +134,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
/** /**
* This method overwrites the base class's clone method to make it a no-op. In base class WC_Data, we are unsetting the meta_id to clone. * This method overwrites the base class's clone method to make it a no-op. In base class WC_Data, we are unsetting the meta_id to clone.
* It seems like this was done to avoid conflicting the metadata when duplicating products. However, doing that does not seems necessary for orders. * It seems like this was done to avoid conflicting the metadata when duplicating products. However, doing that does not seems necessary for orders.
* In-fact, when we do that for orders, we lose the capability to clone orders with custom meta data by caching plugins. This is because, when we clone an order object for caching, it will clone the metadata without the ID. Unfortunately, when this cached object with nulled meta ID is retreived, WC_Data will consider it as a new meta and will insert it as a new meta-data causing duplicates. * In-fact, when we do that for orders, we lose the capability to clone orders with custom meta data by caching plugins. This is because, when we clone an order object for caching, it will clone the metadata without the ID. Unfortunately, when this cached object with nulled meta ID is retrieved, WC_Data will consider it as a new meta and will insert it as a new meta-data causing duplicates.
* *
* Eventually, we should move away from overwriting the __clone method in base class itself, since it's easily possible to still duplicate the product without having to hook into the __clone method. * Eventually, we should move away from overwriting the __clone method in base class itself, since it's easily possible to still duplicate the product without having to hook into the __clone method.
* *

View File

@ -1110,7 +1110,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
* position - integer sort order. * position - integer sort order.
* visible - If visible on frontend. * visible - If visible on frontend.
* variation - If used for variations. * variation - If used for variations.
* Indexed by unqiue key to allow clearing old ones after a set. * Indexed by unique key to allow clearing old ones after a set.
* *
* @since 3.0.0 * @since 3.0.0
* @param array $raw_attributes Array of WC_Product_Attribute objects. * @param array $raw_attributes Array of WC_Product_Attribute objects.

View File

@ -1119,7 +1119,7 @@ class WC_Admin_Addons {
/** /**
* Install WooCommerce Payments from the Extensions screens. * Install WooCommerce Payments from the Extensions screens.
* *
* @param string $section Optional. Extenstions tab. * @param string $section Optional. Extensions tab.
* *
* @return void * @return void
*/ */

View File

@ -362,7 +362,7 @@ class WC_Admin_Status {
<?php <?php
echo esc_html( echo esc_html(
sprintf( sprintf(
// translators: Comma seperated list of missing tables. // translators: Comma separated list of missing tables.
__( 'Missing base tables: %s. Some WooCommerce functionality may not work as expected.', 'woocommerce' ), __( 'Missing base tables: %s. Some WooCommerce functionality may not work as expected.', 'woocommerce' ),
implode( ', ', $missing_tables ) implode( ', ', $missing_tables )
) )

View File

@ -201,7 +201,7 @@ class WC_Helper_Updater {
} }
/** /**
* Get translations updates informations. * Get translations updates information.
* *
* Scans through all subscriptions for the connected user, as well * Scans through all subscriptions for the connected user, as well
* as all Woo extensions without a subscription, and obtains update * as all Woo extensions without a subscription, and obtains update
@ -226,7 +226,7 @@ class WC_Helper_Updater {
$locales = apply_filters( 'plugins_update_check_locales', $locales ); $locales = apply_filters( 'plugins_update_check_locales', $locales );
$locales = array_unique( $locales ); $locales = array_unique( $locales );
// No locales, the respone will be empty, we can return now. // No locales, the response will be empty, we can return now.
if ( empty( $locales ) ) { if ( empty( $locales ) ) {
return array(); return array();
} }

View File

@ -45,7 +45,7 @@ class WC_Settings_Products extends WC_Settings_Page {
} }
/** /**
* Get settings for the detault section. * Get settings for the default section.
* *
* @return array * @return array
*/ */

View File

@ -23,7 +23,7 @@ defined( 'ABSPATH' ) || exit;
if ( $verify_db_tool_available ) { if ( $verify_db_tool_available ) {
echo wp_kses_post( echo wp_kses_post(
sprintf( sprintf(
/* translators: %1%s: Missing tables (seperated by ",") %2$s: Link to check again */ /* translators: %1%s: Missing tables (separated by ",") %2$s: Link to check again */
__( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s. <a href="%2$s">Check again.</a>', 'woocommerce' ), __( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s. <a href="%2$s">Check again.</a>', 'woocommerce' ),
esc_html( implode( ', ', $missing_tables ) ), esc_html( implode( ', ', $missing_tables ) ),
wp_nonce_url( admin_url( 'admin.php?page=wc-status&tab=tools&action=verify_db_tables' ), 'debug_action' ) wp_nonce_url( admin_url( 'admin.php?page=wc-status&tab=tools&action=verify_db_tables' ), 'debug_action' )
@ -32,7 +32,7 @@ defined( 'ABSPATH' ) || exit;
} else { } else {
echo wp_kses_post( echo wp_kses_post(
sprintf( sprintf(
/* translators: %1%s: Missing tables (seperated by ",") */ /* translators: %1%s: Missing tables (separated by ",") */
__( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s.', 'woocommerce' ), __( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s.', 'woocommerce' ),
esc_html( implode( ', ', $missing_tables ) ) esc_html( implode( ', ', $missing_tables ) )
) )

View File

@ -1573,7 +1573,7 @@ class WC_Countries {
// Default Locale Can be filtered to override fields in get_address_fields(). Countries with no specific locale will use default. // Default Locale Can be filtered to override fields in get_address_fields(). Countries with no specific locale will use default.
$this->locale['default'] = apply_filters( 'woocommerce_get_country_locale_default', $this->get_default_address_fields() ); $this->locale['default'] = apply_filters( 'woocommerce_get_country_locale_default', $this->get_default_address_fields() );
// Filter default AND shop base locales to allow overides via a single function. These will be used when changing countries on the checkout. // Filter default AND shop base locales to allow overrides via a single function. These will be used when changing countries on the checkout.
if ( ! isset( $this->locale[ $this->get_base_country() ] ) ) { if ( ! isset( $this->locale[ $this->get_base_country() ] ) ) {
$this->locale[ $this->get_base_country() ] = $this->locale['default']; $this->locale[ $this->get_base_country() ] = $this->locale['default'];
} }

View File

@ -698,7 +698,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
* Set the minimum spend amount. * Set the minimum spend amount.
* *
* @since 3.0.0 * @since 3.0.0
* @param float $amount Minium amount. * @param float $amount Minimum amount.
*/ */
public function set_minimum_amount( $amount ) { public function set_minimum_amount( $amount ) {
$this->set_prop( 'minimum_amount', wc_format_decimal( $amount ) ); $this->set_prop( 'minimum_amount', wc_format_decimal( $amount ) );

View File

@ -62,7 +62,7 @@ class WC_Frontend_Scripts {
* *
* @since 2.1.0 * @since 2.1.0
* @param array List of default WooCommerce styles. * @param array List of default WooCommerce styles.
* @retrun array List of styles to enqueue. * @return array List of styles to enqueue.
*/ */
$styles = apply_filters( $styles = apply_filters(
'woocommerce_enqueue_styles', 'woocommerce_enqueue_styles',

View File

@ -538,7 +538,7 @@ class WC_Query {
// Store reference to this query. // Store reference to this query.
self::$product_query = $q; self::$product_query = $q;
// Additonal hooks to change WP Query. // Additional hooks to change WP Query.
self::add_filter( 'posts_clauses', array( $this, 'product_query_post_clauses' ), 10, 2 ); self::add_filter( 'posts_clauses', array( $this, 'product_query_post_clauses' ), 10, 2 );
add_filter( 'the_posts', array( $this, 'handle_get_posts' ), 10, 2 ); add_filter( 'the_posts', array( $this, 'handle_get_posts' ), 10, 2 );

View File

@ -51,7 +51,7 @@ class WC_Regenerate_Images {
add_action( 'admin_init', array( __CLASS__, 'regenerating_notice' ) ); add_action( 'admin_init', array( __CLASS__, 'regenerating_notice' ) );
add_action( 'woocommerce_hide_regenerating_thumbnails_notice', array( __CLASS__, 'dismiss_regenerating_notice' ) ); add_action( 'woocommerce_hide_regenerating_thumbnails_notice', array( __CLASS__, 'dismiss_regenerating_notice' ) );
// Regenerate thumbnails in the background after settings changes. Not ran on multisite to avoid multiple simultanious jobs. // Regenerate thumbnails in the background after settings changes. Not ran on multisite to avoid multiple simultaneous jobs.
if ( ! is_multisite() ) { if ( ! is_multisite() ) {
add_action( 'customize_save_after', array( __CLASS__, 'maybe_regenerate_images' ) ); add_action( 'customize_save_after', array( __CLASS__, 'maybe_regenerate_images' ) );
add_action( 'after_switch_theme', array( __CLASS__, 'maybe_regenerate_images' ) ); add_action( 'after_switch_theme', array( __CLASS__, 'maybe_regenerate_images' ) );

View File

@ -599,7 +599,7 @@ abstract class Abstract_WC_Order_Data_Store_CPT extends WC_Data_Store_WP impleme
} }
/** /**
* Helper method to update order metadata from intialized order object. * Helper method to update order metadata from initialized order object.
* *
* @param WC_Abstract_Order $order Order object. * @param WC_Abstract_Order $order Order object.
*/ */

View File

@ -1137,7 +1137,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
/** /**
* Check each variation to find the one that matches the $match_attributes. * Check each variation to find the one that matches the $match_attributes.
* *
* Note: Not all meta fields will be set which is why we check existance. * Note: Not all meta fields will be set which is why we check existence.
*/ */
foreach ( $sorted_meta as $variation_id => $variation ) { foreach ( $sorted_meta as $variation_id => $variation ) {
$match = true; $match = true;

View File

@ -182,7 +182,7 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter {
$variable_products = array(); $variable_products = array();
foreach ( $products->products as $product ) { foreach ( $products->products as $product ) {
// Check if the category is set, this means we need to fetch variations seperately as they are not tied to a category. // Check if the category is set, this means we need to fetch variations separately as they are not tied to a category.
if ( ! empty( $args['category'] ) && $product->is_type( 'variable' ) ) { if ( ! empty( $args['category'] ) && $product->is_type( 'variable' ) ) {
$variable_products[] = $product->get_id(); $variable_products[] = $product->get_id();
} }

View File

@ -653,7 +653,7 @@ class WC_Shortcode_Products {
$GLOBALS['post'] = get_post( $product_id ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $GLOBALS['post'] = get_post( $product_id ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
setup_postdata( $GLOBALS['post'] ); setup_postdata( $GLOBALS['post'] );
// Set custom product visibility when quering hidden products. // Set custom product visibility when querying hidden products.
add_action( 'woocommerce_product_is_visible', array( $this, 'set_product_as_visible' ) ); add_action( 'woocommerce_product_is_visible', array( $this, 'set_product_as_visible' ) );
// Render product template. // Render product template.

View File

@ -698,7 +698,7 @@ function wc_get_product_variation_attributes( $variation_id ) {
$attribute = 'attribute_' . sanitize_title( $attribute_name ); $attribute = 'attribute_' . sanitize_title( $attribute_name );
$found_parent_attributes[] = $attribute; $found_parent_attributes[] = $attribute;
if ( ! array_key_exists( $attribute, $variation_attributes ) ) { if ( ! array_key_exists( $attribute, $variation_attributes ) ) {
$variation_attributes[ $attribute ] = ''; // Add it - 'any' will be asumed. $variation_attributes[ $attribute ] = ''; // Add it - 'any' will be assumed.
} }
} }
} }

View File

@ -817,7 +817,7 @@ function wc_privacy_policy_page_id() {
} }
/** /**
* See if the checkbox is enabled or not based on the existance of the terms page and checkbox text. * See if the checkbox is enabled or not based on the existence of the terms page and checkbox text.
* *
* @since 3.4.0 * @since 3.4.0
* @return bool * @return bool
@ -3548,7 +3548,7 @@ function wc_display_product_attributes( $product ) {
* Hook: woocommerce_display_product_attributes. * Hook: woocommerce_display_product_attributes.
* *
* @since 3.6.0. * @since 3.6.0.
* @param array $product_attributes Array of atributes to display; label, value. * @param array $product_attributes Array of attributes to display; label, value.
* @param WC_Product $product Showing attributes for this product. * @param WC_Product $product Showing attributes for this product.
*/ */
$product_attributes = apply_filters( 'woocommerce_display_product_attributes', $product_attributes, $product ); $product_attributes = apply_filters( 'woocommerce_display_product_attributes', $product_attributes, $product );

View File

@ -295,7 +295,7 @@ add_action( 'wp_upgrade', 'wc_taxonomy_metadata_migrate_data', 10, 2 );
* *
* @param int $the_term Term ID. * @param int $the_term Term ID.
* @param int $next_id The id of the next sibling element in save hierarchy level. * @param int $next_id The id of the next sibling element in save hierarchy level.
* @param string $taxonomy Taxnomy. * @param string $taxonomy Taxonomy.
* @param int $index Term index (default: 0). * @param int $index Term index (default: 0).
* @param mixed $terms List of terms. (default: null). * @param mixed $terms List of terms. (default: null).
* @return int * @return int
@ -594,7 +594,7 @@ function wc_clear_term_product_ids( $object_id, $terms, $tt_ids, $taxonomy, $app
add_action( 'set_object_terms', 'wc_clear_term_product_ids', 10, 6 ); add_action( 'set_object_terms', 'wc_clear_term_product_ids', 10, 6 );
/** /**
* Get full list of product visibilty term ids. * Get full list of product visibility term ids.
* *
* @since 3.0.0 * @since 3.0.0
* @return int[] * @return int[]

View File

@ -1902,7 +1902,7 @@ function wc_update_350_db_version() {
} }
/** /**
* Drop the fk_wc_download_log_permission_id FK as we use a new one with the table and blog prefix for MS compatability. * Drop the fk_wc_download_log_permission_id FK as we use a new one with the table and blog prefix for MS compatibility.
* *
* @return void * @return void
*/ */

View File

@ -37,7 +37,7 @@ class Init {
} }
/** /**
* Boostrap REST API. * Bootstrap REST API.
*/ */
public function __construct() { public function __construct() {
// Hook in data stores. // Hook in data stores.

View File

@ -129,7 +129,7 @@ class ProductVariations extends \WC_REST_Product_Variations_Controller {
unset( $args['s'] ); unset( $args['s'] );
} }
// Retreive variations without specifying a parent product. // Retrieve variations without specifying a parent product.
if ( "/{$this->namespace}/variations" === $request->get_route() ) { if ( "/{$this->namespace}/variations" === $request->get_route() ) {
unset( $args['post_parent'] ); unset( $args['post_parent'] );
} }

View File

@ -142,7 +142,7 @@ class Products extends \WC_REST_Products_Controller {
/** /**
* Check whether the request is for products low in stock. * Check whether the request is for products low in stock.
* *
* It matches requests with paramaters: * It matches requests with parameters:
* *
* low_in_stock = true * low_in_stock = true
* page = 1 * page = 1

View File

@ -76,7 +76,7 @@ class DeprecatedExtendedTask extends Task {
} }
/** /**
* Additonal info. * Additional info.
* *
* @return string * @return string
*/ */

View File

@ -253,7 +253,7 @@ class TaskLists {
} }
/** /**
* Temporarily store the active task to persist across page loads when neccessary. * Temporarily store the active task to persist across page loads when necessary.
* Most tasks do not need this. * Most tasks do not need this.
*/ */
public static function set_active_task() { public static function set_active_task() {

View File

@ -302,7 +302,7 @@ class Loader {
} }
/** /**
* Hooks extra neccessary data into the component settings array already set in WooCommerce core. * Hooks extra necessary data into the component settings array already set in WooCommerce core.
* *
* @param array $settings Array of component settings. * @param array $settings Array of component settings.
* @return array Array of component settings. * @return array Array of component settings.

View File

@ -105,7 +105,7 @@ class Settings {
} }
/** /**
* Hooks extra neccessary data into the component settings array already set in WooCommerce core. * Hooks extra necessary data into the component settings array already set in WooCommerce core.
* *
* @param array $settings Array of component settings. * @param array $settings Array of component settings.
* @return array Array of component settings. * @return array Array of component settings.

View File

@ -238,7 +238,7 @@ class WCAdminAssets {
} }
/** /**
* Registers all the neccessary scripts and styles to show the admin experience. * Registers all the necessary scripts and styles to show the admin experience.
*/ */
public function register_scripts() { public function register_scripts() {
if ( ! function_exists( 'wp_set_script_translations' ) ) { if ( ! function_exists( 'wp_set_script_translations' ) ) {

View File

@ -124,7 +124,7 @@ class WCAdminUser {
} }
/** /**
* Helper to retrive user data fields. * Helper to retrieve user data fields.
* *
* Migrates old key prefixes as well. * Migrates old key prefixes as well.
* *

View File

@ -466,7 +466,7 @@ final class CodeHacker {
} }
/** /**
* Apply the reigstered hacks to the contents of a file. * Apply the registered hacks to the contents of a file.
* *
* @param string $code Code content to hack. * @param string $code Code content to hack.
* @param string $path Path of the file being hacked. * @param string $path Path of the file being hacked.

View File

@ -86,7 +86,7 @@ final class FunctionsMockerHack extends CodeHack {
} }
/** /**
* Hacks code by replacing elegible function invocations with an invocation to this class' static method with the same name. * Hacks code by replacing eligible function invocations with an invocation to this class' static method with the same name.
* *
* @param string $code The code to hack. * @param string $code The code to hack.
* @param string $path The path of the file containing the code to hack. * @param string $path The path of the file containing the code to hack.

View File

@ -72,7 +72,7 @@ final class StaticMockerHack extends CodeHack {
} }
/** /**
* Hacks code by replacing elegible method invocations with an invocation a static method on this class composed from the class and the method names. * Hacks code by replacing eligible method invocations with an invocation a static method on this class composed from the class and the method names.
* *
* @param string $code The code to hack. * @param string $code The code to hack.
* @param string $path The path of the file containing the code to hack. * @param string $path The path of the file containing the code to hack.

View File

@ -125,7 +125,7 @@ StaticMockerHack::add_method_mocks([
Inside your test files you can create classes that extend classes marked as `final` thanks to the `BypassFinalsHack` that is registered at bootstrap time. No extra configuration is needed. Inside your test files you can create classes that extend classes marked as `final` thanks to the `BypassFinalsHack` that is registered at bootstrap time. No extra configuration is needed.
If you want to try it out, mark the `WC_Admin_Foobar` in the previos example as `final`, then add the following to the tests file: `class WC_Admin_Foobar_Subclass extends WC_Admin_Foobar {}`. Without the hack you would get a `Class WC_Admin_Foobar_Subclass may not inherit from final class (WC_Admin_Foobar)` error when trying to run the tests. If you want to try it out, mark the `WC_Admin_Foobar` in the previous example as `final`, then add the following to the tests file: `class WC_Admin_Foobar_Subclass extends WC_Admin_Foobar {}`. Without the hack you would get a `Class WC_Admin_Foobar_Subclass may not inherit from final class (WC_Admin_Foobar)` error when trying to run the tests.
## How it works under the hood ## How it works under the hood

View File

@ -12,7 +12,7 @@ const {
*/ */
test.describe('Payment Gateways API tests', () => { test.describe('Payment Gateways API tests', () => {
test('can view all payment gatways', async ({ test('can view all payment gateways', async ({
request request
}) => { }) => {
// call API to retrieve the payment gateways // call API to retrieve the payment gateways
@ -167,7 +167,7 @@ test.describe('Payment Gateways API tests', () => {
test('can view a payment gateway', async ({ test('can view a payment gateway', async ({
request request
}) => { }) => {
// call API to retrieve a single payment gatway // call API to retrieve a single payment gateway
const response = await request.get('/wp-json/wc/v3/payment_gateways/bacs'); const response = await request.get('/wp-json/wc/v3/payment_gateways/bacs');
const responseJSON = await response.json(); const responseJSON = await response.json();
expect(response.status()).toEqual(200); expect(response.status()).toEqual(200);
@ -213,7 +213,7 @@ test.describe('Payment Gateways API tests', () => {
test('can update a payment gateway', async ({ test('can update a payment gateway', async ({
request request
}) => { }) => {
// call API to update a payment gatway // call API to update a payment gateway
const response = await request.put('/wp-json/wc/v3/payment_gateways/bacs', { const response = await request.put('/wp-json/wc/v3/payment_gateways/bacs', {
data: { data: {
enabled: true enabled: true

View File

@ -558,7 +558,7 @@ test.describe('Products API tests: CRUD', () => {
const response = await request.post('wp-json/wc/v3/products/reviews', { const response = await request.post('wp-json/wc/v3/products/reviews', {
data: { data: {
product_id: 999, product_id: 999,
review: "A non existant product!", review: "A non existent product!",
reviewer: "John Do Not", reviewer: "John Do Not",
reviewer_email: "john.do.not@example.com", reviewer_email: "john.do.not@example.com",
rating: 5 rating: 5

View File

@ -1968,7 +1968,7 @@ test.describe('Settings API tests: CRUD', () => {
test.describe('List all Email Customer Processing Order settings', () => { test.describe('List all Email Customer Processing Order settings', () => {
test('can retrieve all email customer processsing order settings', async ({ test('can retrieve all email customer processing order settings', async ({
request request
}) => { }) => {
// call API to retrieve all settings options // call API to retrieve all settings options

View File

@ -78,7 +78,7 @@ test.describe( 'Shipping zones API tests', () => {
} ); } );
test( 'can retrieve a shipping zone', async ({request}) => { test( 'can retrieve a shipping zone', async ({request}) => {
//call API to retrive the created shipping zone //call API to retrieve the created shipping zone
const response = await request.get( `/wp-json/wc/v3/shipping/zones/${shippingZone.id}`); const response = await request.get( `/wp-json/wc/v3/shipping/zones/${shippingZone.id}`);
const responseJSON = await response.json(); const responseJSON = await response.json();
@ -88,7 +88,7 @@ test.describe( 'Shipping zones API tests', () => {
} ); } );
test( 'can list all shipping zones', async ({request}) => { test( 'can list all shipping zones', async ({request}) => {
//call API to retrive all the shipping zones //call API to retrieve all the shipping zones
const response = await request.get( 'wp-json/wc/v3/shipping/zones'); const response = await request.get( 'wp-json/wc/v3/shipping/zones');
const responseJSON = await response.json(); const responseJSON = await response.json();
@ -119,7 +119,7 @@ test.describe( 'Shipping zones API tests', () => {
test( 'can add a shipping region to a shipping zone', async ({request}) => { test( 'can add a shipping region to a shipping zone', async ({request}) => {
//call API to retrive the locations of the last created shipping zone //call API to retrieve the locations of the last created shipping zone
const response = await request.get( `/wp-json/wc/v3/shipping/zones/${shippingZone.id}/locations`); const response = await request.get( `/wp-json/wc/v3/shipping/zones/${shippingZone.id}/locations`);
expect( response.status() ).toEqual( 200 ); expect( response.status() ).toEqual( 200 );

View File

@ -550,7 +550,7 @@ test.describe('System Status API tests', () => {
test('can retrieve a system status tool', async ({ test('can retrieve a system status tool', async ({
request request
}) => { }) => {
// call API to retrieve a system staus tool // call API to retrieve a system status tool
const response = await request.get('/wp-json/wc/v3/system_status/tools/clear_transients'); const response = await request.get('/wp-json/wc/v3/system_status/tools/clear_transients');
const responseJSON = await response.json(); const responseJSON = await response.json();
expect(response.status()).toEqual(200); expect(response.status()).toEqual(200);

View File

@ -74,7 +74,7 @@ If you would like to customize the `PHP`, `WordPress` or `WooCommerce` versions
- `WC_VERSION` - `WC_VERSION`
- Acceptable versions can be found on the [WooCommerce Releases](https://github.com/woocommerce/woocommerce/releases) page - Acceptable versions can be found on the [WooCommerce Releases](https://github.com/woocommerce/woocommerce/releases) page
- `PHP` - `PHP`
- Any PHP version you see it. Please note that WooCommerce requries a minimum of PHP 7.2. - Any PHP version you see it. Please note that WooCommerce requires a minimum of PHP 7.2.
**Example** **Example**
@ -82,7 +82,7 @@ The command below will create and environment with WordPress version 6.2, WooCom
`UPDATE_WP_JSON_FILE=1 WP_VERSION=6.2 WC_TEST_VERSION=7.5.1 PHP_VERSION=8.2 pnpm run env:test` `UPDATE_WP_JSON_FILE=1 WP_VERSION=6.2 WC_TEST_VERSION=7.5.1 PHP_VERSION=8.2 pnpm run env:test`
If you'd like to run with the default configuation, simply remove the `UPDATE_WP_JSON_FILE`. If you'd like to run with the default configuration, simply remove the `UPDATE_WP_JSON_FILE`.
For more information how to configure the test environment for `wp-env`, please checkout the [documentation](https://github.com/WordPress/gutenberg/tree/trunk/packages/env) documentation. For more information how to configure the test environment for `wp-env`, please checkout the [documentation](https://github.com/WordPress/gutenberg/tree/trunk/packages/env) documentation.

View File

@ -1,6 +1,6 @@
const { test, expect } = require( '@playwright/test' ); const { test, expect } = require( '@playwright/test' );
// a represenation of the menu structure for WC // a representation of the menu structure for WC
const wcPages = [ const wcPages = [
{ {
name: 'WooCommerce', name: 'WooCommerce',

View File

@ -174,7 +174,7 @@ test.describe( 'Shopper > Update variable product', () => {
).toContainText( productPrice ); ).toContainText( productPrice );
} ); } );
test( 'Shopper can change attributes to combination with dimentions and weight', async ( { test( 'Shopper can change attributes to combination with dimensions and weight', async ( {
page, page,
} ) => { } ) => {
await page.goto( `product/${ slug }` ); await page.goto( `product/${ slug }` );

View File

@ -2199,7 +2199,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case {
/** /**
* Test that adding a variation via URL parameter succeeds when some attributes belong to the * Test that adding a variation via URL parameter succeeds when some attributes belong to the
* variation and others are specificed via URL parameter. * variation and others are specified via URL parameter.
*/ */
public function test_add_variation_by_url_with_valid_attribute() { public function test_add_variation_by_url_with_valid_attribute() {
add_filter( 'woocommerce_add_to_cart_redirect', '__return_false' ); add_filter( 'woocommerce_add_to_cart_redirect', '__return_false' );

View File

@ -30,7 +30,7 @@ class WC_Tests_Coupon_Data extends WC_Unit_Test_Case {
* @since 3.0.0 * @since 3.0.0
*/ */
public function test_coupon_backwards_compat_props_use_correct_getters() { public function test_coupon_backwards_compat_props_use_correct_getters() {
// Accessing properties directly will throw some wanted deprected notices // Accessing properties directly will throw some wanted deprecated notices
// So we need to let PHPUnit know we are expecting them and it's fine to continue // So we need to let PHPUnit know we are expecting them and it's fine to continue
$legacy_keys = array( $legacy_keys = array(
'id', 'id',

View File

@ -118,7 +118,7 @@ class WC_Tests_CustomerCRUD extends WC_Unit_Test_Case {
*/ */
public function test_customer_backwards_compat() { public function test_customer_backwards_compat() {
// Properties. // Properties.
// Accessing properties directly will throw some wanted deprected notices // Accessing properties directly will throw some wanted deprecated notices
// So we need to let PHPUnit know we are expecting them and it's fine to continue // So we need to let PHPUnit know we are expecting them and it's fine to continue
$legacy_keys = array( $legacy_keys = array(
'id', 'id',

View File

@ -51,7 +51,7 @@ class WC_Tests_WC_Emails extends WC_Unit_Test_Case {
} }
/** /**
* Test that we remove elemets with style display none from html mails. * Test that we remove elements with style display none from html mails.
*/ */
public function test_remove_display_none_elements() { public function test_remove_display_none_elements() {
$email = new WC_Email(); $email = new WC_Email();

View File

@ -60,7 +60,7 @@ class WC_Mock_Background_Process extends WC_Background_Process {
* @return bool * @return bool
*/ */
protected function task( $item ) { protected function task( $item ) {
// We sleep for 5 seconds to mimic a long running tast to complete some tests. // We sleep for 5 seconds to mimic a long running task to complete some tests.
sleep( 5 ); sleep( 5 );
update_option( $item['mock_key'], $item['mock_value'] ); update_option( $item['mock_key'], $item['mock_value'] );
return false; return false;

View File

@ -53,7 +53,7 @@ class WC_Tests_Orders extends WC_Unit_Test_Case {
} }
/** /**
* Test shipping is added and rounded correctly when addedd to total. * Test shipping is added and rounded correctly when added to total.
* *
* @throws WC_Data_Exception When lines cannot be added to order. * @throws WC_Data_Exception When lines cannot be added to order.
*/ */

View File

@ -191,7 +191,7 @@ class WC_Tests_Order_Coupons extends WC_Unit_Test_Case {
$this->assertEquals( '799.00', $order->get_total(), $order->get_total() ); $this->assertEquals( '799.00', $order->get_total(), $order->get_total() );
/** /**
* Discount should be based on subtotal unless coupons apply sequencially. * Discount should be based on subtotal unless coupons apply sequentially.
* *
* Coupon will therefore discount 200. Compare the total without tax so we can compare the ex tax price and avoid rounding mishaps. * Coupon will therefore discount 200. Compare the total without tax so we can compare the ex tax price and avoid rounding mishaps.
*/ */

View File

@ -681,7 +681,7 @@ class WC_Tests_Product_Data_Store extends WC_Unit_Test_Case {
// Check the variation with a multiword attribute name. // Check the variation with a multiword attribute name.
$this->assertEquals( 'color: Green, mounting-plate: galaxy-s6, support: one-year', $multiword_attribute_variation->get_attribute_summary() ); $this->assertEquals( 'color: Green, mounting-plate: galaxy-s6, support: one-year', $multiword_attribute_variation->get_attribute_summary() );
// Add atributes to parent so that they are loaded correctly for variation. // Add attributes to parent so that they are loaded correctly for variation.
$attribute_1 = new WC_Product_Attribute(); $attribute_1 = new WC_Product_Attribute();
$attribute_1->set_name( 'color' ); $attribute_1->set_name( 'color' );
$attribute_1->set_options( array( 'Green', 'Blue' ) ); $attribute_1->set_options( array( 'Green', 'Blue' ) );

View File

@ -247,7 +247,7 @@ class Payment_Gateways extends WC_REST_Unit_Test_Case {
$this->assertEquals( 'woo@woo.local', $paypal['settings']['email']['value'] ); $this->assertEquals( 'woo@woo.local', $paypal['settings']['email']['value'] );
$this->assertEquals( 'yes', $paypal['settings']['testmode']['value'] ); $this->assertEquals( 'yes', $paypal['settings']['testmode']['value'] );
// Test bogus paramter. // Test bogus parameter.
$request = new WP_REST_Request( 'POST', '/wc/v3/payment_gateways/paypal' ); $request = new WP_REST_Request( 'POST', '/wc/v3/payment_gateways/paypal' );
$request->set_body_params( $request->set_body_params(
array( array(

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* Test tax funcitons. * Test tax functions.
* *
* @package WooCommerce\Tests\Tax * @package WooCommerce\Tests\Tax
* @since 3.4.0 * @since 3.4.0

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* Test template funcitons. * Test template functions.
* *
* @package WooCommerce\Tests\Templates * @package WooCommerce\Tests\Templates
* @since 3.4.0 * @since 3.4.0

View File

@ -74,7 +74,7 @@ class WC_Tests_Conditional_Functions extends WC_Unit_Test_Case {
} }
/** /**
* Callback for chaning home url to https. * Callback for changing home url to https.
* *
* @return string * @return string
*/ */

View File

@ -10,7 +10,7 @@
*/ */
class WC_Tests_Widget extends WC_Unit_Test_Case { class WC_Tests_Widget extends WC_Unit_Test_Case {
/** /**
* Test intance creation * Test instance creation
* *
* @return void * @return void
*/ */

Some files were not shown because too many files have changed in this diff Show More