Cherry pick 52199 into release/9.4 (#52340)

* Early translation mitigation (#52199)

* Improve handling (WP 6.7+) when translations are inadvertently loaded early.

* Changelog.

* Prep for cherry pick 52199

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
This commit is contained in:
github-actions[bot] 2024-10-25 08:42:32 -07:00 committed by GitHub
parent acfd40e1f9
commit 36571fc140
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -868,7 +868,7 @@ final class WooCommerce {
*/ */
$locale = apply_filters( 'plugin_locale', $locale, 'woocommerce' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment $locale = apply_filters( 'plugin_locale', $locale, 'woocommerce' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment
unload_textdomain( 'woocommerce' ); unload_textdomain( 'woocommerce', true );
load_textdomain( 'woocommerce', WP_LANG_DIR . '/woocommerce/woocommerce-' . $locale . '.mo' ); load_textdomain( 'woocommerce', WP_LANG_DIR . '/woocommerce/woocommerce-' . $locale . '.mo' );
load_plugin_textdomain( 'woocommerce', false, plugin_basename( dirname( WC_PLUGIN_FILE ) ) . '/i18n/languages' ); load_plugin_textdomain( 'woocommerce', false, plugin_basename( dirname( WC_PLUGIN_FILE ) ) . '/i18n/languages' );
} }

View File

@ -173,6 +173,7 @@ WooCommerce comes with some sample data you can use to see how products look; im
**WooCommerce** **WooCommerce**
* Fix - Support situations in which (WooCommerce) translations are inadvertently loaded too early. [#52199](https://github.com/woocommerce/woocommerce/pull/52199)
* Fix - Add a retry mechanism to the query to obtain the SKU lock for product creation through the API. [#51735](https://github.com/woocommerce/woocommerce/pull/51735) * Fix - Add a retry mechanism to the query to obtain the SKU lock for product creation through the API. [#51735](https://github.com/woocommerce/woocommerce/pull/51735)
* Fix - Fix `Error: Failed opening required '.../wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/AI/ProductsSchema.php` fatal error [#51912](https://github.com/woocommerce/woocommerce/pull/51912) * Fix - Fix `Error: Failed opening required '.../wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/AI/ProductsSchema.php` fatal error [#51912](https://github.com/woocommerce/woocommerce/pull/51912)
* Fix - Resolved fatal error when applying Brands-restricted coupon [#51577](https://github.com/woocommerce/woocommerce/pull/51577) * Fix - Resolved fatal error when applying Brands-restricted coupon [#51577](https://github.com/woocommerce/woocommerce/pull/51577)