From 2ebbe685556920c86d21284711cae0f60713d5f6 Mon Sep 17 00:00:00 2001 From: Gabriel Manussakis <9420947+Manussakis@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:23:04 -0300 Subject: [PATCH] [Accessibility] Fix typos in inline documentation in woocommerce client, includes, and lib folders (#50739) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix typo in inline doc in woocommerce client, includes, and lib folders * Fix typo in comment * Uppercase the Brazilian word --------- Co-authored-by: Darin Kotter Co-authored-by: NĂ©stor Soriano --- plugins/woocommerce/README.md | 2 +- .../fix-37502-typos-in-inline-doc-in-woocommerce-plugin | 4 ++++ plugins/woocommerce/client/legacy/css/helper.scss | 4 ++-- .../client/legacy/js/jquery-blockui/jquery.blockUI.js | 4 ++-- .../client/legacy/js/photoswipe/photoswipe-ui-default.js | 2 +- plugins/woocommerce/includes/abstracts/abstract-wc-order.php | 2 +- plugins/woocommerce/includes/class-wc-coupon.php | 2 +- plugins/woocommerce/includes/class-wc-geo-ip.php | 2 +- plugins/woocommerce/includes/cli/class-wc-cli-com-command.php | 2 +- .../includes/export/class-wc-product-csv-exporter.php | 2 +- .../includes/import/class-wc-product-csv-importer.php | 2 +- .../includes/interfaces/class-wc-queue-interface.php | 2 +- .../Version3/class-wc-rest-product-reviews-controller.php | 2 +- .../class-wc-rest-product-shipping-classes-controller.php | 2 +- .../Version3/class-wc-rest-product-variations-controller.php | 2 +- .../Version3/class-wc-rest-products-controller.php | 2 +- plugins/woocommerce/includes/wc-core-functions.php | 4 ++-- plugins/woocommerce/includes/wc-template-functions.php | 4 ++-- plugins/woocommerce/includes/wc-update-functions.php | 4 ++-- plugins/woocommerce/lib/packages/Detection/MobileDetect.php | 2 +- 20 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 plugins/woocommerce/changelog/fix-37502-typos-in-inline-doc-in-woocommerce-plugin diff --git a/plugins/woocommerce/README.md b/plugins/woocommerce/README.md index 2bb739cbeab..2e02f101ff2 100644 --- a/plugins/woocommerce/README.md +++ b/plugins/woocommerce/README.md @@ -72,7 +72,7 @@ pnpm run --filter=@woocommerce/block-library test Here is a collection of scripts that can help when developing the React-based admin interface. ```bash -# Create a develoment build of the React-based admin client. +# Create a development build of the React-based admin client. pnpm --filter=@woocommerce/admin-library dev # Create and watch a development build of the React-based admin client. pnpm --filter=@woocommerce/admin-library start diff --git a/plugins/woocommerce/changelog/fix-37502-typos-in-inline-doc-in-woocommerce-plugin b/plugins/woocommerce/changelog/fix-37502-typos-in-inline-doc-in-woocommerce-plugin new file mode 100644 index 00000000000..185ab29d77b --- /dev/null +++ b/plugins/woocommerce/changelog/fix-37502-typos-in-inline-doc-in-woocommerce-plugin @@ -0,0 +1,4 @@ +Significance: minor +Type: tweak + +Fix typo in inline doc in woocommerce client, includes, and lib folders. diff --git a/plugins/woocommerce/client/legacy/css/helper.scss b/plugins/woocommerce/client/legacy/css/helper.scss index b4123b551e8..61f20279cc9 100644 --- a/plugins/woocommerce/client/legacy/css/helper.scss +++ b/plugins/woocommerce/client/legacy/css/helper.scss @@ -201,7 +201,7 @@ $admin-theme-color: var(--wp-admin-theme-color); } /*------------------------------------------------------------------------------ - Subscriptons Header + Subscriptions Header ------------------------------------------------------------------------------*/ .wc-helper { @@ -356,7 +356,7 @@ $admin-theme-color: var(--wp-admin-theme-color); } /*------------------------------------------------------------------------------ - Subscripton table + Subscription table ------------------------------------------------------------------------------*/ .wc-helper { diff --git a/plugins/woocommerce/client/legacy/js/jquery-blockui/jquery.blockUI.js b/plugins/woocommerce/client/legacy/js/jquery-blockui/jquery.blockUI.js index b2cba9e0678..229b6cf1ed9 100644 --- a/plugins/woocommerce/client/legacy/js/jquery-blockui/jquery.blockUI.js +++ b/plugins/woocommerce/client/legacy/js/jquery-blockui/jquery.blockUI.js @@ -191,7 +191,7 @@ // enable if you want key and mouse events to be disabled for content that is blocked bindEvents: true, - // be default blockUI will supress tab navigation from leaving blocking content + // by default blockUI will suppress tab navigation from leaving blocking content // (if bindEvents is true) constrainTabKey: true, @@ -286,7 +286,7 @@ var z = opts.baseZ; // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform; - // layer1 is the iframe layer which is used to supress bleed through of underlying content + // layer1 is the iframe layer which is used to suppress bleed through of underlying content // layer2 is the overlay layer which has opacity and a wait cursor (by default) // layer3 is the message content that is displayed while blocking var lyr1, lyr2, lyr3, s; diff --git a/plugins/woocommerce/client/legacy/js/photoswipe/photoswipe-ui-default.js b/plugins/woocommerce/client/legacy/js/photoswipe/photoswipe-ui-default.js index f3733e1bc7a..5cb38042b4d 100755 --- a/plugins/woocommerce/client/legacy/js/photoswipe/photoswipe-ui-default.js +++ b/plugins/woocommerce/client/legacy/js/photoswipe/photoswipe-ui-default.js @@ -705,7 +705,7 @@ var PhotoSwipeUI_Default = }, 50); } - // toogle pswp--fs class on root element + // toggle pswp--fs class on root element framework[ (_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class' ](pswp.template, 'pswp--fs'); }; diff --git a/plugins/woocommerce/includes/abstracts/abstract-wc-order.php b/plugins/woocommerce/includes/abstracts/abstract-wc-order.php index ac30221490b..57786b9a591 100644 --- a/plugins/woocommerce/includes/abstracts/abstract-wc-order.php +++ b/plugins/woocommerce/includes/abstracts/abstract-wc-order.php @@ -1413,7 +1413,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { private function get_temporary_coupon( WC_Order_Item_Coupon $coupon_item ): WC_Coupon { $coupon_object = new WC_Coupon(); - // Since WooCommerce 8.7 a succint 'coupon_info' line item meta entry is created + // Since WooCommerce 8.7 a succinct 'coupon_info' line item meta entry is created // whenever a coupon is applied to an order. Previously a more verbose 'coupon_data' was created. $coupon_info = $coupon_item->get_meta( 'coupon_info', true ); diff --git a/plugins/woocommerce/includes/class-wc-coupon.php b/plugins/woocommerce/includes/class-wc-coupon.php index 01e4ac8a489..5c7691cf092 100644 --- a/plugins/woocommerce/includes/class-wc-coupon.php +++ b/plugins/woocommerce/includes/class-wc-coupon.php @@ -85,7 +85,7 @@ class WC_Coupon extends WC_Legacy_Coupon { * Error message. * * This property should not be considered public API, and should not be accessed directly. - * It is being added to supress PHP > 8.0 warnings against dynamic property creation, and all access + * It is being added to suppress PHP > 8.0 warnings against dynamic property creation, and all access * should be through the getter and setter methods, namely `get_error_message()` and `set_error_message()`. * In the future, the access modifier may be changed back to protected. * diff --git a/plugins/woocommerce/includes/class-wc-geo-ip.php b/plugins/woocommerce/includes/class-wc-geo-ip.php index 392025a83f7..9c5e751d270 100644 --- a/plugins/woocommerce/includes/class-wc-geo-ip.php +++ b/plugins/woocommerce/includes/class-wc-geo-ip.php @@ -633,7 +633,7 @@ class WC_Geo_IP { ); /** - * Contry names. + * Country names. * * @var array */ diff --git a/plugins/woocommerce/includes/cli/class-wc-cli-com-command.php b/plugins/woocommerce/includes/cli/class-wc-cli-com-command.php index 5f6f7b63144..d56ec1b29fe 100644 --- a/plugins/woocommerce/includes/cli/class-wc-cli-com-command.php +++ b/plugins/woocommerce/includes/cli/class-wc-cli-com-command.php @@ -137,7 +137,7 @@ class WC_CLI_COM_Command { * # force connecting to WCCOM even if site is already connected. * $ wp wc com connect --force * - * # Pass password to comman. + * # Pass password to command. * $ wp wc com connect --password=PASSWORD * * @param array $args Positional arguments to include when calling the command. diff --git a/plugins/woocommerce/includes/export/class-wc-product-csv-exporter.php b/plugins/woocommerce/includes/export/class-wc-product-csv-exporter.php index 1c0b976dddf..10808c09bc4 100644 --- a/plugins/woocommerce/includes/export/class-wc-product-csv-exporter.php +++ b/plugins/woocommerce/includes/export/class-wc-product-csv-exporter.php @@ -262,7 +262,7 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter { * @since 3.1.0 * * @param array $row An associative array with the data of a single row in the CSV file. - * @param WC_Product $product The product object correspnding to the current row. + * @param WC_Product $product The product object corresponding to the current row. * @param WC_Product_CSV_Exporter $exporter The instance of the CSV exporter. */ return apply_filters( 'woocommerce_product_export_row_data', $row, $product, $this ); diff --git a/plugins/woocommerce/includes/import/class-wc-product-csv-importer.php b/plugins/woocommerce/includes/import/class-wc-product-csv-importer.php index 27be278e6eb..804426ed9aa 100644 --- a/plugins/woocommerce/includes/import/class-wc-product-csv-importer.php +++ b/plugins/woocommerce/includes/import/class-wc-product-csv-importer.php @@ -198,7 +198,7 @@ class WC_Product_CSV_Importer extends WC_Product_Importer { return absint( $original_id ); } - // See if the given ID maps to a valid product allready. + // See if the given ID maps to a valid product already. $existing_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_type IN ( 'product', 'product_variation' ) AND ID = %d;", $id ) ); // WPCS: db call ok, cache ok. if ( $existing_id ) { diff --git a/plugins/woocommerce/includes/interfaces/class-wc-queue-interface.php b/plugins/woocommerce/includes/interfaces/class-wc-queue-interface.php index 3cfe06845ce..c4e3ef442e7 100644 --- a/plugins/woocommerce/includes/interfaces/class-wc-queue-interface.php +++ b/plugins/woocommerce/includes/interfaces/class-wc-queue-interface.php @@ -91,7 +91,7 @@ interface WC_Queue_Interface { public function cancel_all( $hook, $args = array(), $group = '' ); /** - * Get the date and time for the next scheduled occurence of an action with a given hook + * Get the date and time for the next scheduled occurrence of an action with a given hook * (an optionally that matches certain args and group), if any. * * @param string $hook The hook that the job will trigger. diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php index 9ae674c382b..0e25996d107 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php @@ -1065,7 +1065,7 @@ class WC_REST_Product_Reviews_Controller extends WC_REST_Controller { } /** - * Get the reivew, if the ID is valid. + * Get the review, if the ID is valid. * * @since 3.5.0 * @param int $id Supplied ID. diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-shipping-classes-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-shipping-classes-controller.php index a8d37886478..f0baad08771 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-shipping-classes-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-shipping-classes-controller.php @@ -53,7 +53,7 @@ class WC_REST_Product_Shipping_Classes_Controller extends WC_REST_Product_Shippi } /** - * Callback fuction for the slug-suggestion endpoint. + * Callback function for the slug-suggestion endpoint. * * @param WP_REST_Request $request Full details about the request. * @return string The suggested slug. diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php index aa298f52749..aaa06648fe1 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php @@ -446,7 +446,7 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Product_Variations_V if ( is_wp_error( $upload ) ) { /** - * Filter to check if it should supress the image upload error, false by default. + * Filter to check if it should suppress the image upload error, false by default. * * @since 4.5.0 * @param bool false If it should suppress. diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php index b4a3a933faa..f1c472a38cd 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php @@ -232,7 +232,7 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller { } if ( wc_product_sku_enabled() ) { - // Do a partial match for a sku. Supercedes sku parameter that does exact matching. + // Do a partial match for a sku. Supersedes sku parameter that does exact matching. if ( ! empty( $request['search_sku'] ) ) { // Store this for use in the query clause filters. $this->search_sku_in_product_lookup_table = $request['search_sku']; diff --git a/plugins/woocommerce/includes/wc-core-functions.php b/plugins/woocommerce/includes/wc-core-functions.php index 2af8724638b..4158fd900e0 100644 --- a/plugins/woocommerce/includes/wc-core-functions.php +++ b/plugins/woocommerce/includes/wc-core-functions.php @@ -1833,7 +1833,7 @@ function wc_uasort_comparison( $a, $b ) { } /** - * Sort values based on ascii, usefull for special chars in strings. + * Sort values based on ascii, useful for special chars in strings. * * @param string $a First value. * @param string $b Second value. @@ -2524,7 +2524,7 @@ function wc_selected( $value, $options ) { * Retrieves the MySQL server version. Based on $wpdb. * * @since 3.4.1 - * @return array Vesion information. + * @return array Version information. */ function wc_get_server_database_version() { global $wpdb; diff --git a/plugins/woocommerce/includes/wc-template-functions.php b/plugins/woocommerce/includes/wc-template-functions.php index de3ae910131..5187fb20817 100644 --- a/plugins/woocommerce/includes/wc-template-functions.php +++ b/plugins/woocommerce/includes/wc-template-functions.php @@ -237,7 +237,7 @@ function wc_set_loop_prop( $prop, $value = '' ) { } /** - * Set the current visbility for a product in the woocommerce_loop global. + * Set the current visibility for a product in the woocommerce_loop global. * * @since 4.4.0 * @param int $product_id Product it to cache visibility for. @@ -3805,7 +3805,7 @@ function wc_empty_cart_message() { // This adds the cart-empty classname to the notice to preserve backwards compatibility (for styling purposes etc). $notice = str_replace( 'class="woocommerce-info"', 'class="cart-empty woocommerce-info"', $notice ); - // Return the notice within a consistent wrapper element. This is targetted by some scripts such as cart.js. + // Return the notice within a consistent wrapper element. This is targeted by some scripts such as cart.js. // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '
' . $notice . '
'; } diff --git a/plugins/woocommerce/includes/wc-update-functions.php b/plugins/woocommerce/includes/wc-update-functions.php index 6076aa58646..179cd988255 100644 --- a/plugins/woocommerce/includes/wc-update-functions.php +++ b/plugins/woocommerce/includes/wc-update-functions.php @@ -416,7 +416,7 @@ function wc_update_209_brazillian_state() { // phpcs:disable WordPress.DB.SlowDBQuery - // Update brazillian state codes. + // Update Brazilian state codes. $wpdb->update( $wpdb->postmeta, array( @@ -2598,7 +2598,7 @@ function wc_update_770_remove_multichannel_marketing_feature_options() { /** * Migrate transaction data which was being incorrectly stored in the postmeta table to HPOS tables. * - * @return bool Whether there are pending migration recrods. + * @return bool Whether there are pending migration records. */ function wc_update_810_migrate_transactional_metadata_for_hpos() { global $wpdb; diff --git a/plugins/woocommerce/lib/packages/Detection/MobileDetect.php b/plugins/woocommerce/lib/packages/Detection/MobileDetect.php index d4c2d48c7c8..f7eb621e537 100644 --- a/plugins/woocommerce/lib/packages/Detection/MobileDetect.php +++ b/plugins/woocommerce/lib/packages/Detection/MobileDetect.php @@ -789,7 +789,7 @@ class MobileDetect 'SamsungBrowser' => 'SamsungBrowser/[VER]', 'Iron' => 'Iron/[VER]', // @note: Safari 7534.48.3 is actually Version 5.1. - // @note: On BlackBerry the Version is overwriten by the OS. + // @note: On BlackBerry the Version is overwritten by the OS. 'Safari' => ['Version/[VER]', 'Safari/[VER]'], 'Skyfire' => 'Skyfire/[VER]', 'Tizen' => 'Tizen/[VER]',