Fix typos. (#50047)

This commit is contained in:
Caleb Mazalevskis 2024-08-24 01:26:09 +08:00 committed by GitHub
parent e66ccf698c
commit b4fd419f74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
72 changed files with 133 additions and 109 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Comment: Fix comment typos across various files.

View File

@ -1052,7 +1052,7 @@ describe( 'getStoreTimeZoneMoment', () => {
expect( utcOffset ).not.toHaveBeenCalled();
} );
it( 'should use the utc offest when it is set', () => {
it( 'should use the utc offset when it is set', () => {
global.window.wcSettings = {
timeZone: '+06:00',
};

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Comment: Fix comment typos across various files.

View File

@ -8,7 +8,7 @@
"wordpress",
"woocommerce",
"expression",
"evalution"
"evaluation"
],
"engines": {
"node": "^20.11.1",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Comment: Fix comment typos across various files.

View File

@ -50,7 +50,7 @@ describe( 'numberFormat', () => {
} );
describe( 'parseNumber', () => {
it( 'should remove thousand seperator before parsing number', () => {
it( 'should remove thousand separator before parsing number', () => {
const config = {
decimalSeparator: ',',
thousandSeparator: '.',

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Comment: Fix comment typos across various files.

View File

@ -1,5 +1,5 @@
/**
* Helper function to select a checkbox if it exists within a element
* Helper function to select a checkbox if it exists within an element
*
* @param element - The DOM element to check for a checkbox
*/

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Comment: Fix comment typos across various files.

View File

@ -167,10 +167,10 @@ export const advancedFilters = applyFilters(
placeholder: __( 'Search order number', 'woocommerce' ),
remove: __( 'Remove order number filter', 'woocommerce' ),
rule: __(
'Select a order number filter match',
'Select an order number filter match',
'woocommerce'
),
/* translators: A sentence describing a order number filter. See screen shot for context: https://cloudup.com/ccxhyH2mEDg */
/* translators: A sentence describing an order number filter. See screen shot for context: https://cloudup.com/ccxhyH2mEDg */
title: __(
'<title>Order #</title> <rule/> <filter/>',
'woocommerce'
@ -210,7 +210,7 @@ export const advancedFilters = applyFilters(
'Select an IP address filter match',
'woocommerce'
),
/* translators: A sentence describing a order number filter. See screen shot for context: https://cloudup.com/ccxhyH2mEDg */
/* translators: A sentence describing an order number filter. See screen shot for context: https://cloudup.com/ccxhyH2mEDg */
title: __(
'<title>IP Address</title> <rule/> <filter/>',
'woocommerce'

View File

@ -441,7 +441,7 @@ export const useAddAutoBlockPreviewEventListenersAndObservers = (
unsubscribeCallbacks.push( removeEventListenerHidePopover );
}
// Add event listner to the button which will insert a default pattern
// Add event listener to the button which will insert a default pattern
// when there are no patterns inserted in the block preview.
const removePatternButtonClickListener = addPatternButtonClickListener(
documentElement,

View File

@ -203,7 +203,7 @@ describe( 'inbox_note_view event', () => {
notesHaveResolved: true,
isBatchUpdating: false,
} ) );
// The original InboxNotecard has a VisibilityDetector so I prefered to mock it and always call onNoteVisible
// The original InboxNotecard has a VisibilityDetector so I preferred to mock it and always call onNoteVisible
InboxNoteCard.mockImplementation( ( { onNoteVisible, note } ) => {
useEffect( () => onNoteVisible( note ), [] );
return <div>{ note.id }</div>;

View File

@ -24,7 +24,7 @@ type UseRegisteredChannels = {
};
/**
* A object that maps the product listings status in
* An object that maps the product listings status in
* plugins/woocommerce/src/Admin/Marketing/MarketingChannelInterface.php backend
* to SyncStatusType frontend.
*/

View File

@ -60,9 +60,9 @@ const Edit = ( {
<div
{ ...blockProps }
/**
* If block is descendant of the All Products block, we don't want to
* apply style here because it will be applied inside Block using
* useColors, useTypography, and useSpacing hooks.
* If block is a descendant of the All Products block, we don't
* want to apply style here because it will be applied inside
* Block using useColors, useTypography, and useSpacing hooks.
*/
style={
attributes.isDescendantOfAllProducts ? undefined : style

View File

@ -43,9 +43,9 @@ const Edit = ( {
<div
{ ...blockProps }
/**
* If block is descendant of the All Products block, we don't want to
* apply style here because it will be applied inside Block using
* useColors, useTypography, and useSpacing hooks.
* If block is a descendant of the All Products block, we don't
* want to apply style here because it will be applied inside
* Block using useColors, useTypography, and useSpacing hooks.
*/
style={ attributes.isDescendantOfAllProducts ? undefined : style }
>

View File

@ -26,7 +26,7 @@ interface BlockErrorBase {
*/
button?: React.ReactNode;
/**
* Controls whether to show the error block or fail silently
* Controls whether to show the error block or fail silently.
*/
showErrorBlock?: boolean;
}

View File

@ -30,11 +30,11 @@ export interface PriceSliderProps {
*/
currency: Currency;
/**
* Whether values are loading or not.
* Whether values are loading.
*/
isLoading?: boolean;
/**
* Whether values are updating or not. The update starts when the price slider is changed.
* Whether values are updating. The update starts when the price slider is changed.
*/
isUpdating?: boolean;
/**
@ -66,11 +66,11 @@ export interface PriceSliderProps {
*/
showFilterButton?: boolean;
/**
* Whether to show input fields for the values or not.
* Whether to show input fields for the values.
*/
showInputFields?: boolean;
/**
* Whether to show input fields inline with the slider or not.
* Whether to show input fields inline with the slider.
*/
inlineInput?: boolean;
/**
@ -78,7 +78,7 @@ export interface PriceSliderProps {
*/
step?: number;
/**
* Whether we're in the editor or not.
* Whether we're in the editor.
*/
isEditor?: boolean;
}

View File

@ -50,7 +50,7 @@ describe( 'usePriceConstraints', () => {
expect( container.props[ 'data-minPriceConstraint' ] ).toBe( 2000 );
} );
it( 'previous price constraint should be preserved when new price is not a infinite number', () => {
it( 'previous price constraint should be preserved when new price is not an infinite number', () => {
const renderer = TestRenderer.create(
<TestComponent price={ 1000 } />
);

View File

@ -61,9 +61,9 @@ export const __internalSetRedirectUrl = ( redirectUrl: string ) => ( {
} );
/**
* Set whether the checkout has an error or not
* Set whether the checkout has an error
*
* @param hasError Whether the checkout has an error or not
* @param hasError Whether the checkout has an error
*/
export const __internalSetHasError = ( hasError = true ) => ( {
type: types.SET_HAS_ERROR,

View File

@ -114,7 +114,7 @@ export function IncompatibleExtensionsNotice( {
// translators: %s is the number of incompatible extensions.
_n(
'%s more incompatibility',
'%s more incompatibilites',
'%s more incompatibilities',
remainingEntries,
'woocommerce'
),

View File

@ -109,7 +109,7 @@ function processObjWithInnerKeys( obj ) {
function augmentSupports( supports ) {
if ( supports && 'color' in supports ) {
// If background or text is not specified (true or false)
// then add it as true.a
// then add it as true.
if (
typeof supports.color === 'object' &&
! ( 'background' in supports.color )

View File

@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: WooCommerce Blocks Test Enable Experimental Features
* Description: Enable exerimental features for WooCommerce Blocks that are behind feature flags.
* Description: Enable experimental features for WooCommerce Blocks that are behind feature flags.
* Plugin URI: https://github.com/woocommerce/woocommerce
* Author: WooCommerce
*

View File

@ -78,7 +78,7 @@ test.describe( 'Shopper → Shipping', () => {
await expect(
userPage.getByText(
'Shipping options will be displayed here after entering your full shipping addres'
'Shipping options will be displayed here after entering your full shipping address'
)
).toBeVisible();
@ -86,7 +86,7 @@ test.describe( 'Shopper → Shipping', () => {
await expect(
userPage.getByText(
'Shipping options will be displayed here after entering your full shipping addres'
'Shipping options will be displayed here after entering your full shipping address'
)
).toBeHidden();
} );

View File

@ -412,7 +412,7 @@ test.describe( `${ blockData.name }`, () => {
).toBeVisible();
} );
test( 'Dimentions > Block spacing: changing option should update the preview', async ( {
test( 'Dimensions > Block spacing: changing option should update the preview', async ( {
editor,
pageObject,
} ) => {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Comment: Fix comment typos across various files.

View File

@ -230,7 +230,7 @@
* 2nd parameter `precision` can be an object matching `settings.number`
*/
var formatNumber = lib.formatNumber = lib.format = function(number, precision, thousand, decimal) {
// Resursively format arrays:
// Recursively format arrays:
if (isArray(number)) {
return map(number, function(val) {
return formatNumber(val, precision, thousand, decimal);
@ -275,7 +275,7 @@
* To do: tidy up the parameters
*/
var formatMoney = lib.formatMoney = function(number, symbol, precision, thousand, decimal, format) {
// Resursively format arrays:
// Recursively format arrays:
if (isArray(number)) {
return map(number, function(val){
return formatMoney(val, symbol, precision, thousand, decimal, format);
@ -315,7 +315,7 @@
* List should be an array of numbers
* Second parameter can be an object containing keys that match the params
*
* Returns array of accouting-formatted number strings of same length
* Returns array of accounting-formatted number strings of the same length
*
* NB: `white-space:pre` CSS rule is required on the list container to prevent
* browsers from collapsing the whitespace in the output strings.

View File

@ -39,7 +39,7 @@ jQuery(function( $ ) {
},
/**
* Insert generate coupon code buttom HTML.
* Insert generate coupon code button HTML.
*/
insert_generate_coupon_code_button: function() {
$( '.post-type-shop_coupon' ).find( '#title' ).after(

View File

@ -995,7 +995,7 @@
// update slider.slides
slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
// re-setup the slider to accomdate new slide
// re-setup the slider to accommodate new slide
slider.setup();
//FlexSlider: added() Callback
@ -1021,7 +1021,7 @@
// update slider.slides
slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
// re-setup the slider to accomdate new slide
// re-setup the slider to accommodate new slide
slider.setup();
// FlexSlider: removed() Callback
@ -1091,7 +1091,7 @@
itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
itemMargin: 0, //{NEW} Integer: Margin between carousel items.
minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
maxItems: 0, //{NEW} Integer: Maximum number of carousel items that should be visible. Items will resize fluidly when above this limit.
move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide

View File

@ -57,7 +57,7 @@
}
/**
* Determin whether sourcebuster.js is available.
* Determine whether sourcebuster.js is available.
*
* @returns {boolean} Whether sourcebuster.js is available.
*/

View File

@ -986,7 +986,7 @@ class WC_Form_Handler {
}
}
// Peform the login.
// Perform the login.
$user = wp_signon( apply_filters( 'woocommerce_login_credentials', $creds ), is_ssl() );
if ( is_wp_error( $user ) ) {

View File

@ -538,7 +538,7 @@ class Notes extends \WC_REST_CRUD_Controller {
*
* @param string $url The URL needing a nonce.
* @param string $action The nonce action.
* @param string $name The nonce anme.
* @param string $name The nonce name.
* @return string A fully formed URL.
*/
private function maybe_add_nonce_to_url( string $url, string $action = '', string $name = '' ) : string {
@ -547,7 +547,7 @@ class Notes extends \WC_REST_CRUD_Controller {
}
if ( empty( $name ) ) {
// Default paramater name.
// Default parameter name.
$name = '_wpnonce';
}

View File

@ -37,7 +37,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller {
protected $rest_base = 'onboarding/tasks';
/**
* Duration to milisecond mapping.
* Duration to millisecond mapping.
*
* @var array
*/

View File

@ -2,7 +2,7 @@
/**
* REST API Payment Gateway Suggestions Controller
*
* Handles requests to install and activate depedent plugins.
* Handles requests to install and activate dependent plugins.
*/
namespace Automattic\WooCommerce\Admin\API;

View File

@ -2,7 +2,7 @@
/**
* REST API Plugins Controller
*
* Handles requests to install and activate depedent plugins.
* Handles requests to install and activate dependent plugins.
*/
namespace Automattic\WooCommerce\Admin\API;

View File

@ -263,7 +263,7 @@ final class ProductsLowInStock extends \WC_REST_Products_Controller {
/**
* Return a query string for low in stock products.
* The query string incldues the following replacement strings:
* The query string includes the following replacement strings:
* - :selects
* - :postmeta_join
* - :postmeta_wheres

View File

@ -86,7 +86,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface {
*/
protected function assign_report_columns() {
$table_name = self::get_db_table_name();
// Avoid ambigious columns in SQL query.
// Avoid ambiguous columns in SQL query.
$this->report_columns = array(
'order_id' => "DISTINCT {$table_name}.order_id",
'parent_id' => "{$table_name}.parent_id",

View File

@ -96,7 +96,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface {
*/
protected function assign_report_columns() {
$table_name = self::get_db_table_name();
// Avoid ambigious columns in SQL query.
// Avoid ambiguous columns in SQL query.
$refunds = "ABS( SUM( CASE WHEN {$table_name}.net_total < 0 THEN {$table_name}.net_total ELSE 0 END ) )";
$gross_sales =
"( SUM({$table_name}.total_sales)" .

View File

@ -105,7 +105,7 @@ trait StatsDataStoreTrait {
'pages' => $total_pages,
'page_no' => (int) $query_args['page'],
);
// If the requested page is out off range, return the deault empty object.
// If the requested page is out off range, return the default empty object.
if ( $query_args['page'] >= 1 && $query_args['page'] <= $total_pages ) {
// Fetch the actual data.
$data = $this->get_noncached_stats_data( $query_args, $params, $data, $expected_interval_count );

View File

@ -61,7 +61,7 @@ abstract class Task {
protected $task_list;
/**
* Duration to milisecond mapping.
* Duration to millisecond mapping.
*
* @var string
*/

View File

@ -121,7 +121,7 @@ class Tax extends Task {
}
/**
* Addtional data.
* Additional data.
*
* @return array
*/

View File

@ -172,7 +172,7 @@ class Init {
if ( ! PageController::is_admin_page() ) {
return;
}
// Dequeing this to avoid conflicts, until we remove the 'woocommerce-page' class.
// Dequeuing this to avoid conflicts, until we remove the 'woocommerce-page' class.
wp_dequeue_style( 'woocommerce-blocktheme' );
}

View File

@ -59,7 +59,7 @@ class ProductFormsController {
}
/**
* Create ot update a product_form post for each product form template.
* Create or update a product_form post for each product form template.
* If the post already exists, it will be updated.
* If the post does not exist, it will be created even if the action is `update`.
*

View File

@ -96,7 +96,7 @@ class RedirectionController {
/**
* Check if a product is supported by the new experience.
*
* @param array $product_templates The registered product teamplates.
* @param array $product_templates The registered product templates.
*/
public function set_product_templates( array $product_templates ): void {
$this->product_templates = $product_templates;

View File

@ -676,7 +676,7 @@ class Note extends \WC_Data {
*
* @param string $note_action_name Name of action to add a nonce to.
* @param string $nonce_action The nonce action.
* @param string $nonce_name The nonce Name. This is used as the paramater name in the resulting URL for the action.
* @param string $nonce_name The nonce Name. This is used as the parameter name in the resulting URL for the action.
* @return void
* @throws \Exception If note name cannot be found.
*/

View File

@ -220,7 +220,7 @@ class PageController {
*/
public function get_current_page() {
// If 'current_screen' hasn't fired yet, the current page calculation
// will fail which causes `false` to be returned for all subsquent calls.
// will fail which causes `false` to be returned for all subsequent calls.
if ( ! did_action( 'current_screen' ) ) {
_doing_it_wrong( __FUNCTION__, esc_html__( 'Current page retrieval should be called on or after the `current_screen` hook.', 'woocommerce' ), '0.16.0' );
}
@ -394,7 +394,7 @@ class PageController {
}
/**
* Returns true if we are on a page registed with this controller.
* Returns true if we are on a page registered with this controller.
*
* @return boolean
*/
@ -530,7 +530,7 @@ class PageController {
*/
public function remove_app_entry_page_menu_item() {
global $submenu;
// User does not have capabilites to see the submenu.
// User does not have capabilities to see the submenu.
if ( ! current_user_can( 'manage_woocommerce' ) || empty( $submenu['woocommerce'] ) ) {
return;
}

View File

@ -365,7 +365,7 @@ class PluginsHelper {
}
/**
* Callback regsitered by OnboardingPlugins::install_and_activate_async.
* Callback registered by OnboardingPlugins::install_and_activate_async.
*
* It is used to call install_plugins and activate_plugins with a custom logger.
*

View File

@ -32,7 +32,7 @@ class AsyncPluginsInstallLogger implements PluginsInstallLogger {
'no'
);
// Set status as failed in case we run out of exectuion time.
// Set status as failed in case we run out of execution time.
register_shutdown_function(
function () {
$error = error_get_last();
@ -57,7 +57,7 @@ class AsyncPluginsInstallLogger implements PluginsInstallLogger {
}
/**
* Retreive the option.
* Retrieve the option.
*
* @return false|mixed|void
*/

View File

@ -39,7 +39,7 @@ class TransformerService {
* @param bool $is_default_set flag on is default value set.
* @param string $default_value default value.
*
* @throws InvalidArgumentException Throws when one of the requried arguments is missing.
* @throws InvalidArgumentException Throws when one of the required arguments is missing.
* @return mixed|null
*/
public static function apply( $target_value, array $transformer_configs, $is_default_set, $default_value ) {

View File

@ -324,7 +324,7 @@ class ProductCollection extends AbstractBlock {
$is_enhanced_pagination_enabled = ! ( $this->parsed_block['attrs']['forcePageReload'] ?? false );
// Only proceed if the block is a product collection block,
// enhaced pagination is enabled and query IDs match.
// enhanced pagination is enabled and query IDs match.
if ( $is_product_collection_block && $is_enhanced_pagination_enabled && $query_id === $parsed_query_id ) {
$block_content = $this->process_pagination_links( $block_content );
}
@ -414,8 +414,8 @@ class ProductCollection extends AbstractBlock {
/**
* Check inner blocks of Product Collection block if there's one
* incompatible with Interactivity API and if so, disable client-side
* naviagtion.
* incompatible with the Interactivity API and if so, disable client-side
* navigation.
*
* @param array $parsed_block The block being rendered.
* @return string Returns the parsed block, unmodified.
@ -867,7 +867,7 @@ class ProductCollection extends AbstractBlock {
* - For array items with numeric keys, we merge them as normal.
* - For array items with string keys:
*
* - If the value isn't array, we'll use the value comming from the merge array.
* - If the value isn't array, we'll use the value coming from the merge array.
* $base = ['orderby' => 'date']
* $new = ['orderby' => 'meta_value_num']
* Result: ['orderby' => 'meta_value_num']

View File

@ -778,7 +778,7 @@ class ProductQuery extends AbstractBlock {
* - For array items with numeric keys, we merge them as normal.
* - For array items with string keys:
*
* - If the value isn't array, we'll use the value comming from the merge array.
* - If the value isn't array, we'll use the value coming from the merge array.
* $base = ['orderby' => 'date']
* $new = ['orderby' => 'meta_value_num']
* Result: ['orderby' => 'meta_value_num']

View File

@ -285,7 +285,7 @@ final class BlockTypesController {
* and prevent them from showing as an option in the Legacy Widget block.
*
* @param array $widget_types An array of widgets hidden in core.
* @return array $widget_types An array inluding the WooCommerce widgets to hide.
* @return array $widget_types An array including the WooCommerce widgets to hide.
*/
public function hide_legacy_widgets_with_block_equivalent( $widget_types ) {
array_push(

View File

@ -18,7 +18,7 @@ final class QueryFilters {
}
/**
* Filter the posts clauses of the main query to suport global filters.
* Filter the posts clauses of the main query to support global filters.
*
* @param array $args Query args.
* @param \WP_Query $wp_query WP_Query object.

View File

@ -320,7 +320,7 @@ class ArchiveProductTemplatesCompatibility extends AbstractTemplateCompatibility
}
/**
* Check if block is within the product-query namespace
* Check whether block is within the product-query namespace.
*
* @param array $block Parsed block data.
*/
@ -331,7 +331,7 @@ class ArchiveProductTemplatesCompatibility extends AbstractTemplateCompatibility
}
/**
* Check if block has isInherited attribute asigned
* Check whether block has isInherited attribute assigned.
*
* @param array $block Parsed block data.
*/
@ -357,7 +357,7 @@ class ArchiveProductTemplatesCompatibility extends AbstractTemplateCompatibility
}
/**
* Check if block is a Post template
* Check whether block is a Post template.
*
* @param string $block_name Block name.
*/
@ -366,7 +366,7 @@ class ArchiveProductTemplatesCompatibility extends AbstractTemplateCompatibility
}
/**
* Check if block is a Product Template
* Check whether block is a Product Template.
*
* @param string $block_name Block name.
*/
@ -375,7 +375,7 @@ class ArchiveProductTemplatesCompatibility extends AbstractTemplateCompatibility
}
/**
* Check if block is eaither a Post template or Product Template
* Check if block is either a Post template or a Product Template
*
* @param string $block_name Block name.
*/

View File

@ -166,7 +166,7 @@ abstract class ObjectCache {
* @param object|array $object The new object that will replace the already cached one.
* @param int|string|null $id Id of the object to be cached, if null, get_object_id will be used to get it.
* @param int $expiration Expiration of the cached data in seconds from the current time, or DEFAULT_EXPIRATION to use the default value.
* @return bool True on success, false on error or if no object wiith the supplied id was cached.
* @return bool True on success, false on error or if no object with the supplied id was cached.
* @throws CacheException Invalid parameter, or null id was passed and get_object_id returns null too.
*/
public function update_if_cached( $object, $id = null, int $expiration = self::DEFAULT_EXPIRATION ): bool {

View File

@ -330,7 +330,7 @@ class CLIRunner {
* ---
*
* [--order-types]
* : Comma seperated list of order types that needs to be verified. For example, --order-types=shop_order,shop_order_refund
* : Comma-separated list of order types that needs to be verified. For example, --order-types=shop_order,shop_order_refund
* ---
* default: Output of function `wc_get_order_types( 'cot-migration' )`
*
@ -385,7 +385,7 @@ class CLIRunner {
if ( 0 === count( $order_types ) ) {
return WP_CLI::error(
sprintf(
/* Translators: %s is the comma seperated list of order types. */
/* Translators: %s is the comma-separated list of order types. */
__( 'Passed order type does not match any registered order types. Following order types are registered: %s', 'woocommerce' ),
implode( ',', wc_get_order_types( 'cot-migration' ) )
)
@ -927,7 +927,7 @@ ORDER BY $meta_table.order_id ASC, $meta_table.meta_key ASC;
* # Cleanup post data for order 314.
* $ wp wc hpos cleanup 314
*
* # Cleanup postmeta for orders with IDs betweeen 10 and 100 and order 314.
* # Cleanup postmeta for orders with IDs between 10 and 100 and order 314.
* $ wp wc hpos cleanup 10-100 314
*
* # Cleanup postmeta for all orders.
@ -1161,10 +1161,10 @@ ORDER BY $meta_table.order_id ASC, $meta_table.meta_key ASC;
* ---
*
* [--meta_keys=<meta_keys>]
* : Comma separated list of meta keys to backfill.
* : Comma-separated list of meta keys to backfill.
*
* [--props=<props>]
* : Comma separated list of order properties to backfill.
* : Comma-separated list of order properties to backfill.
*
* @since 8.6.0
*

View File

@ -134,7 +134,7 @@ abstract class MetaToCustomTableMigrator extends TableMigrator {
* @return string Generated queries for batch update. Would be of the form:
* INSERT INTO $table ( $columns ) VALUES
* ($value for row 1)
* ($valye for row 2)
* ($value for row 2)
* ...
* ON DUPLICATE KEY UPDATE
* $column1 = VALUES($column1)

View File

@ -14,7 +14,7 @@ namespace Automattic\WooCommerce\Database\Migrations;
abstract class TableMigrator {
/**
* An array of cummulated error messages.
* An array of cumulated error messages.
*
* @var array
*/

View File

@ -63,7 +63,7 @@ class Homescreen {
/**
* Set free shipping in the same country as the store default
* Flag rate in all other countries when any of the following conditions are ture
* Flag rate in all other countries when any of the following conditions are true
*
* - The store sells physical products, has JP and WCS installed and connected, and is located in the US.
* - The store sells physical products, and is not located in US/Canada/Australia/UK (irrelevant if JP is installed or not).
@ -242,7 +242,7 @@ class Homescreen {
*/
public function update_link_structure() {
global $submenu;
// User does not have capabilites to see the submenu.
// User does not have capabilities to see the submenu.
if ( ! current_user_can( 'manage_woocommerce' ) || empty( $submenu['woocommerce'] ) ) {
return;
}

View File

@ -111,7 +111,7 @@ class Loader {
/**
* Set up a div for the header embed to render into.
* The initial contents here are meant as a place loader for when the PHP page initialy loads.
* The initial contents here are meant as a place loader for when the PHP page initially loads.
*/
public static function embed_page_header() {
if ( ! PageController::is_admin_page() && ! PageController::is_embed_page() ) {
@ -541,7 +541,7 @@ class Loader {
}
/**
* Return an object defining the currecy options for the site's current currency
* Return an object defining the currency options for the site's current currency
*
* @return array Settings for the current currency {
* Array of settings.

View File

@ -158,7 +158,7 @@ class Marketing {
}
/**
* Order marketing menu items alphabeticaly.
* Order marketing menu items alphabetically.
* Overview should be first, and Coupons should be second, followed by other marketing menu items.
*
* @return void
@ -178,7 +178,7 @@ class Marketing {
if ( false === $overview_key ) {
/*
* If Overview is not found we may be on a site witha different language.
* If Overview is not found, we may be on a site with a different language.
* We can use a fallback and try to find the overview page by its path.
*/
$overview_key = array_search( 'admin.php?page=wc-admin&path=/marketing', array_column( $marketing_submenu, self::SUBMENU_LOCATION_KEY ), true );
@ -194,7 +194,7 @@ class Marketing {
if ( false === $coupons_key ) {
/*
* If Coupons is not found we may be on a site witha different language.
* If Coupons is not found, we may be on a site with a different language.
* We can use a fallback and try to find the coupons page by its path.
*/
$coupons_key = array_search( 'edit.php?post_type=shop_coupon', array_column( $marketing_submenu, self::SUBMENU_LOCATION_KEY ), true );

View File

@ -170,7 +170,7 @@ class Edit {
*
* @since 7.4.0
*
* @oaram WC_Order $order The order being edited.
* @param WC_Order $order The order being edited.
*/
do_action( 'add_meta_boxes_' . $this->screen_id, $this->order );

View File

@ -632,7 +632,7 @@ class ReviewsListTable extends WP_List_Table {
/**
* Gets the name of the default primary column.
*
* @return string Name of the primary colum.
* @return string Name of the primary column.
*/
protected function get_primary_column_name() : string {
return 'comment';

View File

@ -60,7 +60,7 @@ abstract class ImportScheduler implements ImportInterface {
* Get batch sizes.
*
* @internal
* @retun array
* @return array
*/
public static function get_batch_sizes() {
return array_merge(
@ -96,7 +96,7 @@ abstract class ImportScheduler implements ImportInterface {
*
* @internal
* @param integer|boolean $days Number of days to import.
* @param boolean $skip_existing Skip exisiting records.
* @param boolean $skip_existing Skip existing records.
*/
public static function import_batch_init( $days, $skip_existing ) {
$batch_size = static::get_batch_size( 'import' );
@ -117,7 +117,7 @@ abstract class ImportScheduler implements ImportInterface {
* @internal
* @param int $batch_number Batch number to import (essentially a query page number).
* @param int|bool $days Number of days to import.
* @param bool $skip_existing Skip exisiting records.
* @param bool $skip_existing Skip existing records.
* @return void
*/
public static function import_batch( $batch_number, $days, $skip_existing ) {

View File

@ -78,7 +78,7 @@ class Settings {
}
/**
* Return an object defining the currecy options for the site's current currency
* Return an object defining the currency options for the site's current currency
*
* @return array Settings for the current currency {
* Array of settings.
@ -258,7 +258,7 @@ class Settings {
}
/**
* Removes non necesary feature properties for the client side.
* Removes non-necessary feature properties for the client side.
*
* @return array
*/

View File

@ -16,7 +16,7 @@ use Automattic\WooCommerce\Proxies\LegacyProxy;
defined( 'ABSPATH' ) || exit;
/**
* This class handles the database structure creation and the data synchronization for the custom orders tables. Its responsibilites are:
* This class handles the database structure creation and the data synchronization for the custom orders tables. Its responsibilities are:
*
* - Providing entry points for creating and deleting the required database tables.
* - Synchronizing changes between the custom orders tables and the posts table whenever changes in orders happen.

View File

@ -98,7 +98,7 @@ class OrdersTableDataStore extends \Abstract_WC_Order_Data_Store_CPT implements
);
/**
* Meta keys that are considered ephemereal and do not trigger a full save (updating modified date) when changed.
* Meta keys that are considered ephemeral and do not trigger a full save (updating modified date) when changed.
*
* @var string[]
*/
@ -2644,7 +2644,7 @@ FROM $order_meta_table
}
/**
* Proxy to udpating order meta. Here for backward compatibility reasons.
* Proxy to updating order meta. Here for backward compatibility reasons.
*
* @param \WC_Order $order Order object.
*

View File

@ -130,7 +130,7 @@ class Synchronize {
}
/**
* Runs the syncronization task.
* Runs the synchronization task.
*/
public function run() {
$products = $this->get_next_set_of_downloadable_products();

View File

@ -19,7 +19,7 @@ use WP_Post;
trait OrderAttributionMeta {
/**
* The default fields and their sourcebuster accesors,
* The default fields and their sourcebuster accessors,
* to show in the source data metabox.
*
* @var string[]

View File

@ -281,7 +281,7 @@ class URL {
$double_dots = array_keys( $this->path_parts, '..', true );
$max_dot_index = max( array_merge( $single_dots, $double_dots ) );
// Prepend the required number of traversals and discard unnessary trailing segments.
// Prepend the required number of traversals and discard unnecessary trailing segments.
$last_traversal = $max_dot_index + ( $this->is_non_root_directory ? 1 : 0 );
$parent_path = str_repeat( '../', $level ) . join( '/', array_slice( $this->path_parts, 0, $last_traversal ) );
} elseif ( $parent_path_parts_to_keep < 0 ) {

View File

@ -32,7 +32,7 @@ class Packages {
/**
* Array of package names and their main package classes.
*
* One a package has been merged into WooCommerce Core it should be moved fron the package list and placed in
* One a package has been merged into WooCommerce Core it should be moved from the package list and placed in
* this list. This will ensure that the feature plugin is disabled as well as provide the class to handle
* initialization for the now-merged feature plugin.
*

View File

@ -8,7 +8,7 @@ import fs from 'fs';
*/
import { scanForHookChanges } from '../hook-changes';
describe( 'scanForHookChages', () => {
describe( 'scanForHookChanges', () => {
it( 'should return a Map with multiple entries in patches with multiple hook changes for the same file.', async () => {
// load the text file as a string variable
const content = fs.readFileSync(

View File

@ -488,7 +488,7 @@ describe( 'getChangelogDetails', () => {
'<details>\r\n' +
'<summary>Changelog Entry Comment</summary>' +
'\r\n' +
'#### Comment <!-- a comment explaining why there is no changlog --> ' +
'#### Comment <!-- A comment explaining why there is no changelog --> ' +
'\r\n' +
'</details>';
@ -533,7 +533,7 @@ describe( 'getChangelogDetails', () => {
'<details>\r\n' +
'<summary>Changelog Entry Comment</summary>' +
'\r\n' +
'#### Comment <!-- a comment explaining why there is no changlog --> ' +
'#### Comment <!-- A comment explaining why there is no changelog --> ' +
`<!-- If the changes in this pull request don't warrant a changelog entry, you can alternatively supply a comment here. Note that comments are only accepted with a significance of "Patch" -->\r\n` +
'This is a very useful comment.\r\n' +
'\r\n' +
@ -578,7 +578,7 @@ describe( 'getChangelogDetails', () => {
'<details>\r\n' +
'<summary>Changelog Entry Comment</summary>' +
'\r\n' +
'#### Comment <!-- a comment explaining why there is no changlog --> ' +
'#### Comment <!-- A comment explaining why there is no changelog --> ' +
`<!-- If the changes in this pull request don't warrant a changelog entry, you can alternatively supply a comment here. Note that comments are only accepted with a significance of "Patch" -->\r\n` +
'This is a very useful comment.\r\n' +
"I don't promise!\r\n" +
@ -628,7 +628,7 @@ describe( 'getChangelogDetails', () => {
'<details>\r\n' +
'<summary>Changelog Entry Comment</summary>' +
'\r\n' +
'#### Comment <!-- a comment explaining why there is no changlog --> ' +
'#### Comment <!-- A comment explaining why there is no changelog --> ' +
`<!-- If the changes in this pull request don't warrant a changelog entry, you can alternatively supply a comment here. Note that comments are only accepted with a significance of "Patch" -->\r\n` +
'This is a very useful comment.\r\n' +
'\r\n' +
@ -673,7 +673,7 @@ describe( 'getChangelogDetails', () => {
'<details>\r\n' +
'<summary>Changelog Entry Comment</summary>' +
'\r\n' +
'#### Comment <!-- a comment explaining why there is no changlog --> ' +
'#### Comment <!-- A comment explaining why there is no changelog --> ' +
`<!-- If the changes in this pull request don't warrant a changelog entry, you can alternatively supply a comment here. Note that comments are only accepted with a significance of "Patch" -->\r\n` +
'This is a very useful comment.\r\n' +
'\r\n' +