From 83b6b8ca365326bd4bc1df3707d944589205d390 Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Wed, 6 Nov 2024 15:44:25 -0300 Subject: [PATCH 01/10] Move multi-currency directory to includes, keep PHP files in the same path --- composer.json | 2 +- .../src => includes/multi-currency}/AdminNotices.php | 0 {multi-currency/src => includes/multi-currency}/Analytics.php | 0 .../src => includes/multi-currency}/BackendCurrencies.php | 0 .../src => includes/multi-currency}/Compatibility.php | 0 .../multi-currency}/Compatibility/BaseCompatibility.php | 0 .../multi-currency}/Compatibility/WooCommerceBookings.php | 0 .../multi-currency}/Compatibility/WooCommerceDeposits.php | 0 .../multi-currency}/Compatibility/WooCommerceFedEx.php | 0 .../Compatibility/WooCommerceNameYourPrice.php | 0 .../Compatibility/WooCommercePointsAndRewards.php | 0 .../multi-currency}/Compatibility/WooCommercePreOrders.php | 0 .../Compatibility/WooCommerceProductAddOns.php | 0 .../Compatibility/WooCommerceSubscriptions.php | 0 .../multi-currency}/Compatibility/WooCommerceUPS.php | 0 .../src => includes/multi-currency}/CountryFlags.php | 0 {multi-currency/src => includes/multi-currency}/Currency.php | 0 .../src => includes/multi-currency}/CurrencySwitcherBlock.php | 0 .../multi-currency}/CurrencySwitcherWidget.php | 0 .../multi-currency}/Exceptions/InvalidCurrencyException.php | 0 .../Exceptions/InvalidCurrencyRateException.php | 0 .../src => includes/multi-currency}/FrontendCurrencies.php | 0 .../src => includes/multi-currency}/FrontendPrices.php | 0 .../src => includes/multi-currency}/Geolocation.php | 0 .../Interfaces/MultiCurrencyAccountInterface.php | 0 .../Interfaces/MultiCurrencyApiClientInterface.php | 0 .../Interfaces/MultiCurrencyCacheInterface.php | 0 .../Interfaces/MultiCurrencyLocalizationInterface.php | 0 .../Interfaces/MultiCurrencySettingsInterface.php | 0 {multi-currency/src => includes/multi-currency}/Logger.php | 0 .../src => includes/multi-currency}/MultiCurrency.php | 0 .../multi-currency}/Notes/NoteMultiCurrencyAvailable.php | 0 includes/multi-currency/README.md | 0 .../src => includes/multi-currency}/RestController.php | 0 {multi-currency/src => includes/multi-currency}/Settings.php | 0 .../src => includes/multi-currency}/SettingsOnboardCta.php | 0 .../src => includes/multi-currency}/StorefrontIntegration.php | 0 {multi-currency/src => includes/multi-currency}/Tracking.php | 0 .../src => includes/multi-currency}/UserSettings.php | 0 {multi-currency/src => includes/multi-currency}/Utils.php | 0 .../multi-currency}/client/analytics/index.js | 0 .../multi-currency}/client/blocks/currency-switcher.js | 0 .../client/components/currency-delete-illustration/index.js | 0 .../components/currency-delete-illustration/styles.scss | 0 .../multi-currency}/client/components/preview-modal/index.js | 0 .../client/components/preview-modal/index.scss | 0 .../multi-currency}/client/components/search/index.js | 0 .../multi-currency}/client/components/search/style.scss | 0 .../client/components/search/test/__snapshots__/index.js.snap | 0 .../multi-currency}/client/components/search/test/index.js | 0 {multi-currency => includes/multi-currency}/client/context.js | 0 .../multi-currency}/client/data/action-types.js | 0 .../multi-currency}/client/data/actions.js | 0 .../multi-currency}/client/data/constants.js | 0 .../multi-currency}/client/data/hooks.js | 0 .../multi-currency}/client/data/index.ts | 0 .../multi-currency}/client/data/reducer.js | 0 .../multi-currency}/client/data/resolvers.js | 0 .../multi-currency}/client/data/selectors.js | 0 .../multi-currency}/client/data/store.js | 0 {multi-currency => includes/multi-currency}/client/index.js | 0 .../multi-currency}/client/interface/assets.js | 0 .../multi-currency}/client/interface/components.js | 0 .../multi-currency}/client/interface/data.js | 0 .../multi-currency}/client/interface/functions.js | 0 .../multi-currency/enabled-currencies-list/delete-button.js | 0 .../settings/multi-currency/enabled-currencies-list/index.js | 0 .../enabled-currencies-list/list-item-placeholder.js | 0 .../multi-currency/enabled-currencies-list/list-item.js | 0 .../settings/multi-currency/enabled-currencies-list/list.js | 0 .../enabled-currencies-list/modal-checkbox-list.js | 0 .../multi-currency/enabled-currencies-list/modal-checkbox.js | 0 .../settings/multi-currency/enabled-currencies-list/modal.js | 0 .../multi-currency/enabled-currencies-list/style.scss | 0 .../enabled-currencies-list/test/__snapshots__/index.js.snap | 0 .../multi-currency/enabled-currencies-list/test/index.js | 0 .../multi-currency}/client/settings/multi-currency/index.js | 0 .../client/settings/multi-currency/store-settings/index.js | 0 .../client/settings/multi-currency/store-settings/style.scss | 0 .../store-settings/test/__snapshots__/index.test.js.snap | 0 .../settings/multi-currency/store-settings/test/index.test.js | 0 .../multi-currency}/client/settings/multi-currency/style.scss | 0 .../multi-currency/test/__snapshots__/index.test.js.snap | 0 .../client/settings/multi-currency/test/index.test.js | 0 .../client/settings/single-currency/constants.js | 0 .../client/settings/single-currency/currency-preview.js | 0 .../multi-currency}/client/settings/single-currency/index.js | 0 .../client/settings/single-currency/style.scss | 0 .../single-currency/test/__snapshots__/index.test.js.snap | 0 .../client/settings/single-currency/test/index.test.js | 0 .../multi-currency}/client/setup/index.js | 0 .../client/setup/tasks/add-currencies-task/constants.js | 0 .../client/setup/tasks/add-currencies-task/index.js | 0 .../client/setup/tasks/add-currencies-task/index.scss | 0 .../add-currencies-task/test/__snapshots__/index.test.js.snap | 0 .../client/setup/tasks/add-currencies-task/test/index.test.js | 0 .../client/setup/tasks/add-currencies-task/test/utils.test.js | 0 .../client/setup/tasks/add-currencies-task/utils.js | 0 .../client/setup/tasks/multi-currency-setup.js | 0 .../client/setup/tasks/multi-currency-setup.scss | 0 .../client/setup/tasks/setup-complete-task/index.js | 0 .../client/setup/tasks/setup-complete-task/index.scss | 0 .../client/setup/tasks/setup-complete-task/test/index.test.js | 0 .../client/setup/tasks/store-settings-task/index.js | 0 .../client/setup/tasks/store-settings-task/index.scss | 0 .../store-settings-task/test/__snapshots__/index.test.js.snap | 0 .../client/setup/tasks/store-settings-task/test/index.test.js | 0 .../test/__snapshots__/multi-currency-setup.test.js.snap | 0 .../client/setup/tasks/test/multi-currency-setup.test.js | 0 .../multi-currency}/client/setup/test/index.js | 0 .../multi-currency}/client/utils/currency/index.js | 0 .../multi-currency}/client/utils/currency/test/index.js | 0 .../utils/missing-currencies-message/__tests__/index.test.js | 0 .../client/utils/missing-currencies-message/index.ts | 0 phpcs.xml.dist | 2 +- psalm-baseline.xml | 4 ++-- 116 files changed, 4 insertions(+), 4 deletions(-) rename {multi-currency/src => includes/multi-currency}/AdminNotices.php (100%) rename {multi-currency/src => includes/multi-currency}/Analytics.php (100%) rename {multi-currency/src => includes/multi-currency}/BackendCurrencies.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/BaseCompatibility.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommerceBookings.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommerceDeposits.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommerceFedEx.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommerceNameYourPrice.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommercePointsAndRewards.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommercePreOrders.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommerceProductAddOns.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommerceSubscriptions.php (100%) rename {multi-currency/src => includes/multi-currency}/Compatibility/WooCommerceUPS.php (100%) rename {multi-currency/src => includes/multi-currency}/CountryFlags.php (100%) rename {multi-currency/src => includes/multi-currency}/Currency.php (100%) rename {multi-currency/src => includes/multi-currency}/CurrencySwitcherBlock.php (100%) rename {multi-currency/src => includes/multi-currency}/CurrencySwitcherWidget.php (100%) rename {multi-currency/src => includes/multi-currency}/Exceptions/InvalidCurrencyException.php (100%) rename {multi-currency/src => includes/multi-currency}/Exceptions/InvalidCurrencyRateException.php (100%) rename {multi-currency/src => includes/multi-currency}/FrontendCurrencies.php (100%) rename {multi-currency/src => includes/multi-currency}/FrontendPrices.php (100%) rename {multi-currency/src => includes/multi-currency}/Geolocation.php (100%) rename {multi-currency/src => includes/multi-currency}/Interfaces/MultiCurrencyAccountInterface.php (100%) rename {multi-currency/src => includes/multi-currency}/Interfaces/MultiCurrencyApiClientInterface.php (100%) rename {multi-currency/src => includes/multi-currency}/Interfaces/MultiCurrencyCacheInterface.php (100%) rename {multi-currency/src => includes/multi-currency}/Interfaces/MultiCurrencyLocalizationInterface.php (100%) rename {multi-currency/src => includes/multi-currency}/Interfaces/MultiCurrencySettingsInterface.php (100%) rename {multi-currency/src => includes/multi-currency}/Logger.php (100%) rename {multi-currency/src => includes/multi-currency}/MultiCurrency.php (100%) rename {multi-currency/src => includes/multi-currency}/Notes/NoteMultiCurrencyAvailable.php (100%) create mode 100644 includes/multi-currency/README.md rename {multi-currency/src => includes/multi-currency}/RestController.php (100%) rename {multi-currency/src => includes/multi-currency}/Settings.php (100%) rename {multi-currency/src => includes/multi-currency}/SettingsOnboardCta.php (100%) rename {multi-currency/src => includes/multi-currency}/StorefrontIntegration.php (100%) rename {multi-currency/src => includes/multi-currency}/Tracking.php (100%) rename {multi-currency/src => includes/multi-currency}/UserSettings.php (100%) rename {multi-currency/src => includes/multi-currency}/Utils.php (100%) rename {multi-currency => includes/multi-currency}/client/analytics/index.js (100%) rename {multi-currency => includes/multi-currency}/client/blocks/currency-switcher.js (100%) rename {multi-currency => includes/multi-currency}/client/components/currency-delete-illustration/index.js (100%) rename {multi-currency => includes/multi-currency}/client/components/currency-delete-illustration/styles.scss (100%) rename {multi-currency => includes/multi-currency}/client/components/preview-modal/index.js (100%) rename {multi-currency => includes/multi-currency}/client/components/preview-modal/index.scss (100%) rename {multi-currency => includes/multi-currency}/client/components/search/index.js (100%) rename {multi-currency => includes/multi-currency}/client/components/search/style.scss (100%) rename {multi-currency => includes/multi-currency}/client/components/search/test/__snapshots__/index.js.snap (100%) rename {multi-currency => includes/multi-currency}/client/components/search/test/index.js (100%) rename {multi-currency => includes/multi-currency}/client/context.js (100%) rename {multi-currency => includes/multi-currency}/client/data/action-types.js (100%) rename {multi-currency => includes/multi-currency}/client/data/actions.js (100%) rename {multi-currency => includes/multi-currency}/client/data/constants.js (100%) rename {multi-currency => includes/multi-currency}/client/data/hooks.js (100%) rename {multi-currency => includes/multi-currency}/client/data/index.ts (100%) rename {multi-currency => includes/multi-currency}/client/data/reducer.js (100%) rename {multi-currency => includes/multi-currency}/client/data/resolvers.js (100%) rename {multi-currency => includes/multi-currency}/client/data/selectors.js (100%) rename {multi-currency => includes/multi-currency}/client/data/store.js (100%) rename {multi-currency => includes/multi-currency}/client/index.js (100%) rename {multi-currency => includes/multi-currency}/client/interface/assets.js (100%) rename {multi-currency => includes/multi-currency}/client/interface/components.js (100%) rename {multi-currency => includes/multi-currency}/client/interface/data.js (100%) rename {multi-currency => includes/multi-currency}/client/interface/functions.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/delete-button.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/index.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/list-item-placeholder.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/list-item.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/list.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/modal-checkbox-list.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/modal-checkbox.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/modal.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/style.scss (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/test/__snapshots__/index.js.snap (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/enabled-currencies-list/test/index.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/index.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/store-settings/index.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/store-settings/style.scss (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/store-settings/test/__snapshots__/index.test.js.snap (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/store-settings/test/index.test.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/style.scss (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/test/__snapshots__/index.test.js.snap (100%) rename {multi-currency => includes/multi-currency}/client/settings/multi-currency/test/index.test.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/single-currency/constants.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/single-currency/currency-preview.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/single-currency/index.js (100%) rename {multi-currency => includes/multi-currency}/client/settings/single-currency/style.scss (100%) rename {multi-currency => includes/multi-currency}/client/settings/single-currency/test/__snapshots__/index.test.js.snap (100%) rename {multi-currency => includes/multi-currency}/client/settings/single-currency/test/index.test.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/index.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/add-currencies-task/constants.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/add-currencies-task/index.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/add-currencies-task/index.scss (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/add-currencies-task/test/__snapshots__/index.test.js.snap (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/add-currencies-task/test/index.test.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/add-currencies-task/test/utils.test.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/add-currencies-task/utils.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/multi-currency-setup.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/multi-currency-setup.scss (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/setup-complete-task/index.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/setup-complete-task/index.scss (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/setup-complete-task/test/index.test.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/store-settings-task/index.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/store-settings-task/index.scss (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/store-settings-task/test/__snapshots__/index.test.js.snap (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/store-settings-task/test/index.test.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/test/__snapshots__/multi-currency-setup.test.js.snap (100%) rename {multi-currency => includes/multi-currency}/client/setup/tasks/test/multi-currency-setup.test.js (100%) rename {multi-currency => includes/multi-currency}/client/setup/test/index.js (100%) rename {multi-currency => includes/multi-currency}/client/utils/currency/index.js (100%) rename {multi-currency => includes/multi-currency}/client/utils/currency/test/index.js (100%) rename {multi-currency => includes/multi-currency}/client/utils/missing-currencies-message/__tests__/index.test.js (100%) rename {multi-currency => includes/multi-currency}/client/utils/missing-currencies-message/index.ts (100%) diff --git a/composer.json b/composer.json index 497530e36e1..cdb679b4afb 100644 --- a/composer.json +++ b/composer.json @@ -88,7 +88,7 @@ }, "autoload": { "psr-4": { - "WCPay\\MultiCurrency\\": "multi-currency/src", + "WCPay\\MultiCurrency\\": "includes/multi-currency", "WCPay\\Vendor\\": "lib/packages", "WCPay\\": "src" }, diff --git a/multi-currency/src/AdminNotices.php b/includes/multi-currency/AdminNotices.php similarity index 100% rename from multi-currency/src/AdminNotices.php rename to includes/multi-currency/AdminNotices.php diff --git a/multi-currency/src/Analytics.php b/includes/multi-currency/Analytics.php similarity index 100% rename from multi-currency/src/Analytics.php rename to includes/multi-currency/Analytics.php diff --git a/multi-currency/src/BackendCurrencies.php b/includes/multi-currency/BackendCurrencies.php similarity index 100% rename from multi-currency/src/BackendCurrencies.php rename to includes/multi-currency/BackendCurrencies.php diff --git a/multi-currency/src/Compatibility.php b/includes/multi-currency/Compatibility.php similarity index 100% rename from multi-currency/src/Compatibility.php rename to includes/multi-currency/Compatibility.php diff --git a/multi-currency/src/Compatibility/BaseCompatibility.php b/includes/multi-currency/Compatibility/BaseCompatibility.php similarity index 100% rename from multi-currency/src/Compatibility/BaseCompatibility.php rename to includes/multi-currency/Compatibility/BaseCompatibility.php diff --git a/multi-currency/src/Compatibility/WooCommerceBookings.php b/includes/multi-currency/Compatibility/WooCommerceBookings.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommerceBookings.php rename to includes/multi-currency/Compatibility/WooCommerceBookings.php diff --git a/multi-currency/src/Compatibility/WooCommerceDeposits.php b/includes/multi-currency/Compatibility/WooCommerceDeposits.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommerceDeposits.php rename to includes/multi-currency/Compatibility/WooCommerceDeposits.php diff --git a/multi-currency/src/Compatibility/WooCommerceFedEx.php b/includes/multi-currency/Compatibility/WooCommerceFedEx.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommerceFedEx.php rename to includes/multi-currency/Compatibility/WooCommerceFedEx.php diff --git a/multi-currency/src/Compatibility/WooCommerceNameYourPrice.php b/includes/multi-currency/Compatibility/WooCommerceNameYourPrice.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommerceNameYourPrice.php rename to includes/multi-currency/Compatibility/WooCommerceNameYourPrice.php diff --git a/multi-currency/src/Compatibility/WooCommercePointsAndRewards.php b/includes/multi-currency/Compatibility/WooCommercePointsAndRewards.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommercePointsAndRewards.php rename to includes/multi-currency/Compatibility/WooCommercePointsAndRewards.php diff --git a/multi-currency/src/Compatibility/WooCommercePreOrders.php b/includes/multi-currency/Compatibility/WooCommercePreOrders.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommercePreOrders.php rename to includes/multi-currency/Compatibility/WooCommercePreOrders.php diff --git a/multi-currency/src/Compatibility/WooCommerceProductAddOns.php b/includes/multi-currency/Compatibility/WooCommerceProductAddOns.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommerceProductAddOns.php rename to includes/multi-currency/Compatibility/WooCommerceProductAddOns.php diff --git a/multi-currency/src/Compatibility/WooCommerceSubscriptions.php b/includes/multi-currency/Compatibility/WooCommerceSubscriptions.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommerceSubscriptions.php rename to includes/multi-currency/Compatibility/WooCommerceSubscriptions.php diff --git a/multi-currency/src/Compatibility/WooCommerceUPS.php b/includes/multi-currency/Compatibility/WooCommerceUPS.php similarity index 100% rename from multi-currency/src/Compatibility/WooCommerceUPS.php rename to includes/multi-currency/Compatibility/WooCommerceUPS.php diff --git a/multi-currency/src/CountryFlags.php b/includes/multi-currency/CountryFlags.php similarity index 100% rename from multi-currency/src/CountryFlags.php rename to includes/multi-currency/CountryFlags.php diff --git a/multi-currency/src/Currency.php b/includes/multi-currency/Currency.php similarity index 100% rename from multi-currency/src/Currency.php rename to includes/multi-currency/Currency.php diff --git a/multi-currency/src/CurrencySwitcherBlock.php b/includes/multi-currency/CurrencySwitcherBlock.php similarity index 100% rename from multi-currency/src/CurrencySwitcherBlock.php rename to includes/multi-currency/CurrencySwitcherBlock.php diff --git a/multi-currency/src/CurrencySwitcherWidget.php b/includes/multi-currency/CurrencySwitcherWidget.php similarity index 100% rename from multi-currency/src/CurrencySwitcherWidget.php rename to includes/multi-currency/CurrencySwitcherWidget.php diff --git a/multi-currency/src/Exceptions/InvalidCurrencyException.php b/includes/multi-currency/Exceptions/InvalidCurrencyException.php similarity index 100% rename from multi-currency/src/Exceptions/InvalidCurrencyException.php rename to includes/multi-currency/Exceptions/InvalidCurrencyException.php diff --git a/multi-currency/src/Exceptions/InvalidCurrencyRateException.php b/includes/multi-currency/Exceptions/InvalidCurrencyRateException.php similarity index 100% rename from multi-currency/src/Exceptions/InvalidCurrencyRateException.php rename to includes/multi-currency/Exceptions/InvalidCurrencyRateException.php diff --git a/multi-currency/src/FrontendCurrencies.php b/includes/multi-currency/FrontendCurrencies.php similarity index 100% rename from multi-currency/src/FrontendCurrencies.php rename to includes/multi-currency/FrontendCurrencies.php diff --git a/multi-currency/src/FrontendPrices.php b/includes/multi-currency/FrontendPrices.php similarity index 100% rename from multi-currency/src/FrontendPrices.php rename to includes/multi-currency/FrontendPrices.php diff --git a/multi-currency/src/Geolocation.php b/includes/multi-currency/Geolocation.php similarity index 100% rename from multi-currency/src/Geolocation.php rename to includes/multi-currency/Geolocation.php diff --git a/multi-currency/src/Interfaces/MultiCurrencyAccountInterface.php b/includes/multi-currency/Interfaces/MultiCurrencyAccountInterface.php similarity index 100% rename from multi-currency/src/Interfaces/MultiCurrencyAccountInterface.php rename to includes/multi-currency/Interfaces/MultiCurrencyAccountInterface.php diff --git a/multi-currency/src/Interfaces/MultiCurrencyApiClientInterface.php b/includes/multi-currency/Interfaces/MultiCurrencyApiClientInterface.php similarity index 100% rename from multi-currency/src/Interfaces/MultiCurrencyApiClientInterface.php rename to includes/multi-currency/Interfaces/MultiCurrencyApiClientInterface.php diff --git a/multi-currency/src/Interfaces/MultiCurrencyCacheInterface.php b/includes/multi-currency/Interfaces/MultiCurrencyCacheInterface.php similarity index 100% rename from multi-currency/src/Interfaces/MultiCurrencyCacheInterface.php rename to includes/multi-currency/Interfaces/MultiCurrencyCacheInterface.php diff --git a/multi-currency/src/Interfaces/MultiCurrencyLocalizationInterface.php b/includes/multi-currency/Interfaces/MultiCurrencyLocalizationInterface.php similarity index 100% rename from multi-currency/src/Interfaces/MultiCurrencyLocalizationInterface.php rename to includes/multi-currency/Interfaces/MultiCurrencyLocalizationInterface.php diff --git a/multi-currency/src/Interfaces/MultiCurrencySettingsInterface.php b/includes/multi-currency/Interfaces/MultiCurrencySettingsInterface.php similarity index 100% rename from multi-currency/src/Interfaces/MultiCurrencySettingsInterface.php rename to includes/multi-currency/Interfaces/MultiCurrencySettingsInterface.php diff --git a/multi-currency/src/Logger.php b/includes/multi-currency/Logger.php similarity index 100% rename from multi-currency/src/Logger.php rename to includes/multi-currency/Logger.php diff --git a/multi-currency/src/MultiCurrency.php b/includes/multi-currency/MultiCurrency.php similarity index 100% rename from multi-currency/src/MultiCurrency.php rename to includes/multi-currency/MultiCurrency.php diff --git a/multi-currency/src/Notes/NoteMultiCurrencyAvailable.php b/includes/multi-currency/Notes/NoteMultiCurrencyAvailable.php similarity index 100% rename from multi-currency/src/Notes/NoteMultiCurrencyAvailable.php rename to includes/multi-currency/Notes/NoteMultiCurrencyAvailable.php diff --git a/includes/multi-currency/README.md b/includes/multi-currency/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/multi-currency/src/RestController.php b/includes/multi-currency/RestController.php similarity index 100% rename from multi-currency/src/RestController.php rename to includes/multi-currency/RestController.php diff --git a/multi-currency/src/Settings.php b/includes/multi-currency/Settings.php similarity index 100% rename from multi-currency/src/Settings.php rename to includes/multi-currency/Settings.php diff --git a/multi-currency/src/SettingsOnboardCta.php b/includes/multi-currency/SettingsOnboardCta.php similarity index 100% rename from multi-currency/src/SettingsOnboardCta.php rename to includes/multi-currency/SettingsOnboardCta.php diff --git a/multi-currency/src/StorefrontIntegration.php b/includes/multi-currency/StorefrontIntegration.php similarity index 100% rename from multi-currency/src/StorefrontIntegration.php rename to includes/multi-currency/StorefrontIntegration.php diff --git a/multi-currency/src/Tracking.php b/includes/multi-currency/Tracking.php similarity index 100% rename from multi-currency/src/Tracking.php rename to includes/multi-currency/Tracking.php diff --git a/multi-currency/src/UserSettings.php b/includes/multi-currency/UserSettings.php similarity index 100% rename from multi-currency/src/UserSettings.php rename to includes/multi-currency/UserSettings.php diff --git a/multi-currency/src/Utils.php b/includes/multi-currency/Utils.php similarity index 100% rename from multi-currency/src/Utils.php rename to includes/multi-currency/Utils.php diff --git a/multi-currency/client/analytics/index.js b/includes/multi-currency/client/analytics/index.js similarity index 100% rename from multi-currency/client/analytics/index.js rename to includes/multi-currency/client/analytics/index.js diff --git a/multi-currency/client/blocks/currency-switcher.js b/includes/multi-currency/client/blocks/currency-switcher.js similarity index 100% rename from multi-currency/client/blocks/currency-switcher.js rename to includes/multi-currency/client/blocks/currency-switcher.js diff --git a/multi-currency/client/components/currency-delete-illustration/index.js b/includes/multi-currency/client/components/currency-delete-illustration/index.js similarity index 100% rename from multi-currency/client/components/currency-delete-illustration/index.js rename to includes/multi-currency/client/components/currency-delete-illustration/index.js diff --git a/multi-currency/client/components/currency-delete-illustration/styles.scss b/includes/multi-currency/client/components/currency-delete-illustration/styles.scss similarity index 100% rename from multi-currency/client/components/currency-delete-illustration/styles.scss rename to includes/multi-currency/client/components/currency-delete-illustration/styles.scss diff --git a/multi-currency/client/components/preview-modal/index.js b/includes/multi-currency/client/components/preview-modal/index.js similarity index 100% rename from multi-currency/client/components/preview-modal/index.js rename to includes/multi-currency/client/components/preview-modal/index.js diff --git a/multi-currency/client/components/preview-modal/index.scss b/includes/multi-currency/client/components/preview-modal/index.scss similarity index 100% rename from multi-currency/client/components/preview-modal/index.scss rename to includes/multi-currency/client/components/preview-modal/index.scss diff --git a/multi-currency/client/components/search/index.js b/includes/multi-currency/client/components/search/index.js similarity index 100% rename from multi-currency/client/components/search/index.js rename to includes/multi-currency/client/components/search/index.js diff --git a/multi-currency/client/components/search/style.scss b/includes/multi-currency/client/components/search/style.scss similarity index 100% rename from multi-currency/client/components/search/style.scss rename to includes/multi-currency/client/components/search/style.scss diff --git a/multi-currency/client/components/search/test/__snapshots__/index.js.snap b/includes/multi-currency/client/components/search/test/__snapshots__/index.js.snap similarity index 100% rename from multi-currency/client/components/search/test/__snapshots__/index.js.snap rename to includes/multi-currency/client/components/search/test/__snapshots__/index.js.snap diff --git a/multi-currency/client/components/search/test/index.js b/includes/multi-currency/client/components/search/test/index.js similarity index 100% rename from multi-currency/client/components/search/test/index.js rename to includes/multi-currency/client/components/search/test/index.js diff --git a/multi-currency/client/context.js b/includes/multi-currency/client/context.js similarity index 100% rename from multi-currency/client/context.js rename to includes/multi-currency/client/context.js diff --git a/multi-currency/client/data/action-types.js b/includes/multi-currency/client/data/action-types.js similarity index 100% rename from multi-currency/client/data/action-types.js rename to includes/multi-currency/client/data/action-types.js diff --git a/multi-currency/client/data/actions.js b/includes/multi-currency/client/data/actions.js similarity index 100% rename from multi-currency/client/data/actions.js rename to includes/multi-currency/client/data/actions.js diff --git a/multi-currency/client/data/constants.js b/includes/multi-currency/client/data/constants.js similarity index 100% rename from multi-currency/client/data/constants.js rename to includes/multi-currency/client/data/constants.js diff --git a/multi-currency/client/data/hooks.js b/includes/multi-currency/client/data/hooks.js similarity index 100% rename from multi-currency/client/data/hooks.js rename to includes/multi-currency/client/data/hooks.js diff --git a/multi-currency/client/data/index.ts b/includes/multi-currency/client/data/index.ts similarity index 100% rename from multi-currency/client/data/index.ts rename to includes/multi-currency/client/data/index.ts diff --git a/multi-currency/client/data/reducer.js b/includes/multi-currency/client/data/reducer.js similarity index 100% rename from multi-currency/client/data/reducer.js rename to includes/multi-currency/client/data/reducer.js diff --git a/multi-currency/client/data/resolvers.js b/includes/multi-currency/client/data/resolvers.js similarity index 100% rename from multi-currency/client/data/resolvers.js rename to includes/multi-currency/client/data/resolvers.js diff --git a/multi-currency/client/data/selectors.js b/includes/multi-currency/client/data/selectors.js similarity index 100% rename from multi-currency/client/data/selectors.js rename to includes/multi-currency/client/data/selectors.js diff --git a/multi-currency/client/data/store.js b/includes/multi-currency/client/data/store.js similarity index 100% rename from multi-currency/client/data/store.js rename to includes/multi-currency/client/data/store.js diff --git a/multi-currency/client/index.js b/includes/multi-currency/client/index.js similarity index 100% rename from multi-currency/client/index.js rename to includes/multi-currency/client/index.js diff --git a/multi-currency/client/interface/assets.js b/includes/multi-currency/client/interface/assets.js similarity index 100% rename from multi-currency/client/interface/assets.js rename to includes/multi-currency/client/interface/assets.js diff --git a/multi-currency/client/interface/components.js b/includes/multi-currency/client/interface/components.js similarity index 100% rename from multi-currency/client/interface/components.js rename to includes/multi-currency/client/interface/components.js diff --git a/multi-currency/client/interface/data.js b/includes/multi-currency/client/interface/data.js similarity index 100% rename from multi-currency/client/interface/data.js rename to includes/multi-currency/client/interface/data.js diff --git a/multi-currency/client/interface/functions.js b/includes/multi-currency/client/interface/functions.js similarity index 100% rename from multi-currency/client/interface/functions.js rename to includes/multi-currency/client/interface/functions.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/delete-button.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/delete-button.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/delete-button.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/delete-button.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/index.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/index.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/index.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/index.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/list-item-placeholder.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/list-item-placeholder.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/list-item-placeholder.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/list-item-placeholder.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/list-item.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/list-item.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/list-item.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/list-item.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/list.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/list.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/list.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/list.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal-checkbox-list.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal-checkbox-list.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/modal-checkbox-list.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal-checkbox-list.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal-checkbox.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal-checkbox.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/modal-checkbox.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal-checkbox.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/modal.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/modal.js diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/style.scss b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/style.scss similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/style.scss rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/style.scss diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/test/__snapshots__/index.js.snap b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/test/__snapshots__/index.js.snap similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/test/__snapshots__/index.js.snap rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/test/__snapshots__/index.js.snap diff --git a/multi-currency/client/settings/multi-currency/enabled-currencies-list/test/index.js b/includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/test/index.js similarity index 100% rename from multi-currency/client/settings/multi-currency/enabled-currencies-list/test/index.js rename to includes/multi-currency/client/settings/multi-currency/enabled-currencies-list/test/index.js diff --git a/multi-currency/client/settings/multi-currency/index.js b/includes/multi-currency/client/settings/multi-currency/index.js similarity index 100% rename from multi-currency/client/settings/multi-currency/index.js rename to includes/multi-currency/client/settings/multi-currency/index.js diff --git a/multi-currency/client/settings/multi-currency/store-settings/index.js b/includes/multi-currency/client/settings/multi-currency/store-settings/index.js similarity index 100% rename from multi-currency/client/settings/multi-currency/store-settings/index.js rename to includes/multi-currency/client/settings/multi-currency/store-settings/index.js diff --git a/multi-currency/client/settings/multi-currency/store-settings/style.scss b/includes/multi-currency/client/settings/multi-currency/store-settings/style.scss similarity index 100% rename from multi-currency/client/settings/multi-currency/store-settings/style.scss rename to includes/multi-currency/client/settings/multi-currency/store-settings/style.scss diff --git a/multi-currency/client/settings/multi-currency/store-settings/test/__snapshots__/index.test.js.snap b/includes/multi-currency/client/settings/multi-currency/store-settings/test/__snapshots__/index.test.js.snap similarity index 100% rename from multi-currency/client/settings/multi-currency/store-settings/test/__snapshots__/index.test.js.snap rename to includes/multi-currency/client/settings/multi-currency/store-settings/test/__snapshots__/index.test.js.snap diff --git a/multi-currency/client/settings/multi-currency/store-settings/test/index.test.js b/includes/multi-currency/client/settings/multi-currency/store-settings/test/index.test.js similarity index 100% rename from multi-currency/client/settings/multi-currency/store-settings/test/index.test.js rename to includes/multi-currency/client/settings/multi-currency/store-settings/test/index.test.js diff --git a/multi-currency/client/settings/multi-currency/style.scss b/includes/multi-currency/client/settings/multi-currency/style.scss similarity index 100% rename from multi-currency/client/settings/multi-currency/style.scss rename to includes/multi-currency/client/settings/multi-currency/style.scss diff --git a/multi-currency/client/settings/multi-currency/test/__snapshots__/index.test.js.snap b/includes/multi-currency/client/settings/multi-currency/test/__snapshots__/index.test.js.snap similarity index 100% rename from multi-currency/client/settings/multi-currency/test/__snapshots__/index.test.js.snap rename to includes/multi-currency/client/settings/multi-currency/test/__snapshots__/index.test.js.snap diff --git a/multi-currency/client/settings/multi-currency/test/index.test.js b/includes/multi-currency/client/settings/multi-currency/test/index.test.js similarity index 100% rename from multi-currency/client/settings/multi-currency/test/index.test.js rename to includes/multi-currency/client/settings/multi-currency/test/index.test.js diff --git a/multi-currency/client/settings/single-currency/constants.js b/includes/multi-currency/client/settings/single-currency/constants.js similarity index 100% rename from multi-currency/client/settings/single-currency/constants.js rename to includes/multi-currency/client/settings/single-currency/constants.js diff --git a/multi-currency/client/settings/single-currency/currency-preview.js b/includes/multi-currency/client/settings/single-currency/currency-preview.js similarity index 100% rename from multi-currency/client/settings/single-currency/currency-preview.js rename to includes/multi-currency/client/settings/single-currency/currency-preview.js diff --git a/multi-currency/client/settings/single-currency/index.js b/includes/multi-currency/client/settings/single-currency/index.js similarity index 100% rename from multi-currency/client/settings/single-currency/index.js rename to includes/multi-currency/client/settings/single-currency/index.js diff --git a/multi-currency/client/settings/single-currency/style.scss b/includes/multi-currency/client/settings/single-currency/style.scss similarity index 100% rename from multi-currency/client/settings/single-currency/style.scss rename to includes/multi-currency/client/settings/single-currency/style.scss diff --git a/multi-currency/client/settings/single-currency/test/__snapshots__/index.test.js.snap b/includes/multi-currency/client/settings/single-currency/test/__snapshots__/index.test.js.snap similarity index 100% rename from multi-currency/client/settings/single-currency/test/__snapshots__/index.test.js.snap rename to includes/multi-currency/client/settings/single-currency/test/__snapshots__/index.test.js.snap diff --git a/multi-currency/client/settings/single-currency/test/index.test.js b/includes/multi-currency/client/settings/single-currency/test/index.test.js similarity index 100% rename from multi-currency/client/settings/single-currency/test/index.test.js rename to includes/multi-currency/client/settings/single-currency/test/index.test.js diff --git a/multi-currency/client/setup/index.js b/includes/multi-currency/client/setup/index.js similarity index 100% rename from multi-currency/client/setup/index.js rename to includes/multi-currency/client/setup/index.js diff --git a/multi-currency/client/setup/tasks/add-currencies-task/constants.js b/includes/multi-currency/client/setup/tasks/add-currencies-task/constants.js similarity index 100% rename from multi-currency/client/setup/tasks/add-currencies-task/constants.js rename to includes/multi-currency/client/setup/tasks/add-currencies-task/constants.js diff --git a/multi-currency/client/setup/tasks/add-currencies-task/index.js b/includes/multi-currency/client/setup/tasks/add-currencies-task/index.js similarity index 100% rename from multi-currency/client/setup/tasks/add-currencies-task/index.js rename to includes/multi-currency/client/setup/tasks/add-currencies-task/index.js diff --git a/multi-currency/client/setup/tasks/add-currencies-task/index.scss b/includes/multi-currency/client/setup/tasks/add-currencies-task/index.scss similarity index 100% rename from multi-currency/client/setup/tasks/add-currencies-task/index.scss rename to includes/multi-currency/client/setup/tasks/add-currencies-task/index.scss diff --git a/multi-currency/client/setup/tasks/add-currencies-task/test/__snapshots__/index.test.js.snap b/includes/multi-currency/client/setup/tasks/add-currencies-task/test/__snapshots__/index.test.js.snap similarity index 100% rename from multi-currency/client/setup/tasks/add-currencies-task/test/__snapshots__/index.test.js.snap rename to includes/multi-currency/client/setup/tasks/add-currencies-task/test/__snapshots__/index.test.js.snap diff --git a/multi-currency/client/setup/tasks/add-currencies-task/test/index.test.js b/includes/multi-currency/client/setup/tasks/add-currencies-task/test/index.test.js similarity index 100% rename from multi-currency/client/setup/tasks/add-currencies-task/test/index.test.js rename to includes/multi-currency/client/setup/tasks/add-currencies-task/test/index.test.js diff --git a/multi-currency/client/setup/tasks/add-currencies-task/test/utils.test.js b/includes/multi-currency/client/setup/tasks/add-currencies-task/test/utils.test.js similarity index 100% rename from multi-currency/client/setup/tasks/add-currencies-task/test/utils.test.js rename to includes/multi-currency/client/setup/tasks/add-currencies-task/test/utils.test.js diff --git a/multi-currency/client/setup/tasks/add-currencies-task/utils.js b/includes/multi-currency/client/setup/tasks/add-currencies-task/utils.js similarity index 100% rename from multi-currency/client/setup/tasks/add-currencies-task/utils.js rename to includes/multi-currency/client/setup/tasks/add-currencies-task/utils.js diff --git a/multi-currency/client/setup/tasks/multi-currency-setup.js b/includes/multi-currency/client/setup/tasks/multi-currency-setup.js similarity index 100% rename from multi-currency/client/setup/tasks/multi-currency-setup.js rename to includes/multi-currency/client/setup/tasks/multi-currency-setup.js diff --git a/multi-currency/client/setup/tasks/multi-currency-setup.scss b/includes/multi-currency/client/setup/tasks/multi-currency-setup.scss similarity index 100% rename from multi-currency/client/setup/tasks/multi-currency-setup.scss rename to includes/multi-currency/client/setup/tasks/multi-currency-setup.scss diff --git a/multi-currency/client/setup/tasks/setup-complete-task/index.js b/includes/multi-currency/client/setup/tasks/setup-complete-task/index.js similarity index 100% rename from multi-currency/client/setup/tasks/setup-complete-task/index.js rename to includes/multi-currency/client/setup/tasks/setup-complete-task/index.js diff --git a/multi-currency/client/setup/tasks/setup-complete-task/index.scss b/includes/multi-currency/client/setup/tasks/setup-complete-task/index.scss similarity index 100% rename from multi-currency/client/setup/tasks/setup-complete-task/index.scss rename to includes/multi-currency/client/setup/tasks/setup-complete-task/index.scss diff --git a/multi-currency/client/setup/tasks/setup-complete-task/test/index.test.js b/includes/multi-currency/client/setup/tasks/setup-complete-task/test/index.test.js similarity index 100% rename from multi-currency/client/setup/tasks/setup-complete-task/test/index.test.js rename to includes/multi-currency/client/setup/tasks/setup-complete-task/test/index.test.js diff --git a/multi-currency/client/setup/tasks/store-settings-task/index.js b/includes/multi-currency/client/setup/tasks/store-settings-task/index.js similarity index 100% rename from multi-currency/client/setup/tasks/store-settings-task/index.js rename to includes/multi-currency/client/setup/tasks/store-settings-task/index.js diff --git a/multi-currency/client/setup/tasks/store-settings-task/index.scss b/includes/multi-currency/client/setup/tasks/store-settings-task/index.scss similarity index 100% rename from multi-currency/client/setup/tasks/store-settings-task/index.scss rename to includes/multi-currency/client/setup/tasks/store-settings-task/index.scss diff --git a/multi-currency/client/setup/tasks/store-settings-task/test/__snapshots__/index.test.js.snap b/includes/multi-currency/client/setup/tasks/store-settings-task/test/__snapshots__/index.test.js.snap similarity index 100% rename from multi-currency/client/setup/tasks/store-settings-task/test/__snapshots__/index.test.js.snap rename to includes/multi-currency/client/setup/tasks/store-settings-task/test/__snapshots__/index.test.js.snap diff --git a/multi-currency/client/setup/tasks/store-settings-task/test/index.test.js b/includes/multi-currency/client/setup/tasks/store-settings-task/test/index.test.js similarity index 100% rename from multi-currency/client/setup/tasks/store-settings-task/test/index.test.js rename to includes/multi-currency/client/setup/tasks/store-settings-task/test/index.test.js diff --git a/multi-currency/client/setup/tasks/test/__snapshots__/multi-currency-setup.test.js.snap b/includes/multi-currency/client/setup/tasks/test/__snapshots__/multi-currency-setup.test.js.snap similarity index 100% rename from multi-currency/client/setup/tasks/test/__snapshots__/multi-currency-setup.test.js.snap rename to includes/multi-currency/client/setup/tasks/test/__snapshots__/multi-currency-setup.test.js.snap diff --git a/multi-currency/client/setup/tasks/test/multi-currency-setup.test.js b/includes/multi-currency/client/setup/tasks/test/multi-currency-setup.test.js similarity index 100% rename from multi-currency/client/setup/tasks/test/multi-currency-setup.test.js rename to includes/multi-currency/client/setup/tasks/test/multi-currency-setup.test.js diff --git a/multi-currency/client/setup/test/index.js b/includes/multi-currency/client/setup/test/index.js similarity index 100% rename from multi-currency/client/setup/test/index.js rename to includes/multi-currency/client/setup/test/index.js diff --git a/multi-currency/client/utils/currency/index.js b/includes/multi-currency/client/utils/currency/index.js similarity index 100% rename from multi-currency/client/utils/currency/index.js rename to includes/multi-currency/client/utils/currency/index.js diff --git a/multi-currency/client/utils/currency/test/index.js b/includes/multi-currency/client/utils/currency/test/index.js similarity index 100% rename from multi-currency/client/utils/currency/test/index.js rename to includes/multi-currency/client/utils/currency/test/index.js diff --git a/multi-currency/client/utils/missing-currencies-message/__tests__/index.test.js b/includes/multi-currency/client/utils/missing-currencies-message/__tests__/index.test.js similarity index 100% rename from multi-currency/client/utils/missing-currencies-message/__tests__/index.test.js rename to includes/multi-currency/client/utils/missing-currencies-message/__tests__/index.test.js diff --git a/multi-currency/client/utils/missing-currencies-message/index.ts b/includes/multi-currency/client/utils/missing-currencies-message/index.ts similarity index 100% rename from multi-currency/client/utils/missing-currencies-message/index.ts rename to includes/multi-currency/client/utils/missing-currencies-message/index.ts diff --git a/phpcs.xml.dist b/phpcs.xml.dist index a0bf916f7a9..e997f0fa2fd 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -102,7 +102,7 @@ tests/* - multi-currency/src + includes/multi-currency/* src diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 1eb5fab3f04..2a5164e8af3 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -46,13 +46,13 @@ WC_Subscriptions_Product - + \WC_Product_Addons_Helper \WC_Product_Addons_Helper - + \WC_Name_Your_Price_Helpers \WC_Name_Your_Price_Helpers From 5f987e731027333b29871147b62164027a3c87ad Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Wed, 6 Nov 2024 15:45:17 -0300 Subject: [PATCH 02/10] Fix JS paths and adapt release script --- tasks/release.js | 5 ++--- tsconfig.json | 2 +- webpack/shared.js | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tasks/release.js b/tasks/release.js index 72c3eccdef7..758f550e078 100644 --- a/tasks/release.js +++ b/tasks/release.js @@ -43,9 +43,8 @@ rm( 'dist/*.map' ); // copy the directories to the release folder cp( '-Rf', filesToCopy, targetFolder ); -// copy the multi-currency files -mkdir( '-p', targetFolder + '/multi-currency' ); -cp( '-R', 'multi-currency/src', targetFolder + '/multi-currency/src' ); +// remove the multi-currency/client source files +rm( '-rf', targetFolder + '/includes/multi-currency/client' ); const output = fs.createWriteStream( releaseFolder + '/' + pluginSlug + '.zip' diff --git a/tsconfig.json b/tsconfig.json index f7f56cddd52..13218eb83d0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ "paths": { "assets/*": [ "../assets/*" ], "wcpay/*": [ "./*" ], - "multi-currency/*": [ "../multi-currency/client/*" ], + "multi-currency/*": [ "../includes/multi-currency/client/*" ], "iti/utils": [ "../node_modules/intl-tel-input/build/js/utils" ], "react": [ "../node_modules/@types/react" ] }, diff --git a/webpack/shared.js b/webpack/shared.js index 55c249694ea..68ddf518114 100644 --- a/webpack/shared.js +++ b/webpack/shared.js @@ -26,11 +26,11 @@ module.exports = { 'subscription-edit-page': './client/subscription-edit-page.js', tos: './client/tos/index.js', 'payment-gateways': './client/payment-gateways/index.js', - 'multi-currency': './multi-currency/client/index.js', + 'multi-currency': './includes/multi-currency/client/index.js', 'multi-currency-switcher-block': - './multi-currency/client/blocks/currency-switcher.js', + './includes/multi-currency/client/blocks/currency-switcher.js', 'multi-currency-analytics': - './multi-currency/client/analytics/index.js', + './includes/multi-currency/client/analytics/index.js', order: './client/order/index.js', 'subscriptions-empty-state': './client/subscriptions-empty-state/index.js', @@ -115,14 +115,14 @@ module.exports = { extensions: [ '.ts', '.tsx', '.json', '.js', '.jsx' ], modules: [ path.join( process.cwd(), 'client' ), - path.join( process.cwd(), 'multi-currency', 'client' ), + path.join( process.cwd(), 'includes/multi-currency', 'client' ), 'node_modules', ], alias: { assets: path.resolve( process.cwd(), 'assets' ), 'multi-currency': path.resolve( process.cwd(), - 'multi-currency', + 'includes/multi-currency', 'client' ), wcpay: path.resolve( process.cwd(), 'client' ), From 48c55f23401c03ee03271051db173fc88c1924cc Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Wed, 6 Nov 2024 15:48:04 -0300 Subject: [PATCH 03/10] Add README file to includes/multi-currency --- includes/multi-currency/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/multi-currency/README.md b/includes/multi-currency/README.md index e69de29bb2d..96d828ce2d1 100644 --- a/includes/multi-currency/README.md +++ b/includes/multi-currency/README.md @@ -0,0 +1,5 @@ +# WooPayments multi-currency directory + +This directory contains the multi-currency module, which has been decoupled and extracted from the gateway code. + +The module is responsible for handling all multi-currency functionality, both back-end and front-end. From 2f8c4e557683d13b103da9ab743a5a40232cb5d5 Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Wed, 6 Nov 2024 15:50:31 -0300 Subject: [PATCH 04/10] Add changelog entry --- changelog/fix-9676-multi-currency-autoload | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/fix-9676-multi-currency-autoload diff --git a/changelog/fix-9676-multi-currency-autoload b/changelog/fix-9676-multi-currency-autoload new file mode 100644 index 00000000000..04e7fcfbc58 --- /dev/null +++ b/changelog/fix-9676-multi-currency-autoload @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Keep multi-currency module in the same path to avoid autoload errors. + + From 2998a04ba0bb97784d41815e809bebf9e108c670 Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Wed, 6 Nov 2024 16:40:42 -0300 Subject: [PATCH 05/10] Prevent issue from happening in future upgrades --- includes/multi-currency/MultiCurrency.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/multi-currency/MultiCurrency.php b/includes/multi-currency/MultiCurrency.php index 56e2b5815b4..367c72718db 100644 --- a/includes/multi-currency/MultiCurrency.php +++ b/includes/multi-currency/MultiCurrency.php @@ -364,6 +364,11 @@ public function init_settings_pages( $settings_pages ): array { return $settings_pages; } + // We shouldn't initiate MCCY settings if the plugin was just upgraded due to autoload caveats: https://github.com/Automattic/woocommerce-payments/issues/9676. + if ( did_action( 'upgrader_process_complete' ) ) { + return $settings_pages; + } + if ( $this->payments_account->is_provider_connected() ) { $settings = new Settings( $this ); $settings->init_hooks(); From cccd63e468e90d2dee538f2d8f99523fe3b89104 Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Wed, 6 Nov 2024 17:07:52 -0300 Subject: [PATCH 06/10] Fix comment --- includes/multi-currency/MultiCurrency.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/multi-currency/MultiCurrency.php b/includes/multi-currency/MultiCurrency.php index 367c72718db..6707a689844 100644 --- a/includes/multi-currency/MultiCurrency.php +++ b/includes/multi-currency/MultiCurrency.php @@ -364,7 +364,7 @@ public function init_settings_pages( $settings_pages ): array { return $settings_pages; } - // We shouldn't initiate MCCY settings if the plugin was just upgraded due to autoload caveats: https://github.com/Automattic/woocommerce-payments/issues/9676. + // Due to autoloader limitations, we shouldn't initiate MCCY settings if the plugin was just upgraded: https://github.com/Automattic/woocommerce-payments/issues/9676. if ( did_action( 'upgrader_process_complete' ) ) { return $settings_pages; } From df1857d70a9faf2b7d1da931f14c05b09aae3b58 Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Wed, 6 Nov 2024 17:19:48 -0300 Subject: [PATCH 07/10] Fix Jest config --- tests/js/jest.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/js/jest.config.js b/tests/js/jest.config.js index 03060196d4c..7a918a8d63c 100644 --- a/tests/js/jest.config.js +++ b/tests/js/jest.config.js @@ -5,7 +5,7 @@ module.exports = { moduleDirectories: [ 'node_modules', '/client', - '/multi-currency/client', + '/includes/multi-currency/client', ], moduleNameMapper: { '^react$': '/node_modules/react', @@ -13,7 +13,7 @@ module.exports = { '^moment$': '/node_modules/moment', '^moment-timezone$': '/node_modules/moment-timezone', '^wcpay(.*)$': '/client$1', - '^multi-currency(.*)$': '/multi-currency/client$1', + '^multi-currency(.*)$': '/includes/multi-currency/client$1', '^iti/utils$': '/node_modules/intl-tel-input/build/js/utils', '^assets(.*?)(\\?.*)?$': '/assets$1', '^@woocommerce/blocks-registry$': From f084efb066f27ec33634bf12f92e73cb4cb2db0d Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Wed, 6 Nov 2024 20:27:16 -0300 Subject: [PATCH 08/10] Update includes/multi-currency/MultiCurrency.php Co-authored-by: Hector Lovo --- includes/multi-currency/MultiCurrency.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/multi-currency/MultiCurrency.php b/includes/multi-currency/MultiCurrency.php index 6707a689844..9313a987dc9 100644 --- a/includes/multi-currency/MultiCurrency.php +++ b/includes/multi-currency/MultiCurrency.php @@ -364,7 +364,8 @@ public function init_settings_pages( $settings_pages ): array { return $settings_pages; } - // Due to autoloader limitations, we shouldn't initiate MCCY settings if the plugin was just upgraded: https://github.com/Automattic/woocommerce-payments/issues/9676. + // Due to autoloader limitations, we shouldn't initiate MCCY settings if the plugin was just upgraded: + // https://github.com/Automattic/woocommerce-payments/issues/9676. if ( did_action( 'upgrader_process_complete' ) ) { return $settings_pages; } From e9d01c6b9755b07d72305e5c8ff4d50e1bb0f386 Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Thu, 7 Nov 2024 02:12:38 -0300 Subject: [PATCH 09/10] Fix shared paths --- webpack/shared.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webpack/shared.js b/webpack/shared.js index 68ddf518114..7fe200a9f7a 100644 --- a/webpack/shared.js +++ b/webpack/shared.js @@ -115,15 +115,14 @@ module.exports = { extensions: [ '.ts', '.tsx', '.json', '.js', '.jsx' ], modules: [ path.join( process.cwd(), 'client' ), - path.join( process.cwd(), 'includes/multi-currency', 'client' ), + path.join( process.cwd(), 'includes/multi-currency/client' ), 'node_modules', ], alias: { assets: path.resolve( process.cwd(), 'assets' ), 'multi-currency': path.resolve( process.cwd(), - 'includes/multi-currency', - 'client' + 'includes/multi-currency/client' ), wcpay: path.resolve( process.cwd(), 'client' ), iti: path.resolve( From bbe3b0e9d47ea5c6800cfbaa6254a74b57021535 Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Thu, 7 Nov 2024 02:25:00 -0300 Subject: [PATCH 10/10] Add details about 'client' directory removal in the release step --- tasks/release.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/release.js b/tasks/release.js index 758f550e078..92b8c2986de 100644 --- a/tasks/release.js +++ b/tasks/release.js @@ -43,7 +43,8 @@ rm( 'dist/*.map' ); // copy the directories to the release folder cp( '-Rf', filesToCopy, targetFolder ); -// remove the multi-currency/client source files +// The '/includes/multi-currency/client' directory is removed because '/includes/multi-currency/*' should contain only server-side files. +// Furthermore, the './client' directory is already included in 'dist' during the build step. rm( '-rf', targetFolder + '/includes/multi-currency/client' ); const output = fs.createWriteStream(