# MLM Soft Integration #

## Changelog ##

## 2026-07-09 - version 3.28.7
* Fixed an issue with saving WooCommerce product fields with Cyrillic names on the admin panel settings page. [SignHelper.php]

## 2026-07-01 - version 3.28.6
* Administrators must always be internal users. If they are not, the flag will be forced to true. [MLMSoftLocalUser.php]

## 2026-07-01 - version 3.28.0
* Fixed missing `Stable Tag` field in `readme.txt` and added version substitution in CI pipeline. [MLM-4154]
* Tested up WP to 7.0

## 2026-06-30 - version 3.27.0
* The `forceCreateDocument` boolean parameter has been added to the sendVolumes function. [MLMSoftWCOrder.php]

## 2026-06-16 - version 3.26.0
* Prohibit double use of coupons of the same type. [EWalletCoupon.php]
* Coupon type has been added to the checking function. [EWalletCartHelper.php]
* Added new translations.
* Removed deprecated code.

## 2026-06-11 - version 3.25.0
* Fixed issue with `MeaSoft Delivery Plugin` plugin. [MLMSoftAdminExtraPanel.php]

## 2026-06-09 - version 3.24.1
* Using default parameters in log function. [MLMSoftCouponLogger.php]

## 2026-06-09 - version 3.24.0
* Added logging subsystem.
  * Logging classes have been added to the core.
  * Logging of coupon transactions has been added.

## 2026-06-04 - version 3.23.0
* Plugin options page:
  * Using a unique nonce name to prevent conflicts with third-party plugins. [MLMSoftAdminExtraPanel.php]
  * Added `media-editor` handle to the array of internal scripts to deregister them to avoid conflict. [MLMSoftAdminExtraPanel.php]  

## 2026-05-29 - version 3.22.0
* Added locking of the payment process via EWallet to prevent incorrect transactions.
  * MLMSoftAdminExtraPanel v.17
  * Updated translations.

## 2026-05-27 - version 3.21.0
* Added settings to on/off the logging `backtrace` when deleting a coupon.
* Sending email notifications about important events
  * Added `MLMSoftMailer` class.
  * Added a notification for attempting to remove a coupon for an order with the `Completed` status.
	
## 2026-05-22 - version 3.20.3
* Added the ability to view Backtrace for deleted coupons for administrators.
  * Added backtrace info to description column on the shop_coupon page. [WCAdmin.php]

## 2026-05-20 - version 3.20.2
* Prevent e-wallet payment cancellation if order status is "Completed".
* The `cancelPayment` function now returns a boolean result. [EWalletCoupon.php] 

## 2026-05-15 - version 3.20.1
* Added caching for requests from authorized users.
* MLMSoftAdminExtraPanel v.15

## 2026-05-06 - version 3.19.11
* Suppressed undefined constant message in `MLMSoftDebug` class. [MLMSoftDebug.php]
* Added `mlmsoft_integration_api_request_profiling` action. [MLMSoftApi3.php]
* Checking the constants `DOING_AJAX`, `DOING_CRON`, `REST_REQUEST` and `wp-json` string to reduce the number of API requests when checking the referral code. [MLMSoftPlugin.php]

## 2026-04-29 - version 3.19.10
* Prevent duplicate `Online office authorization` request in NRM. [MLMSoftRemoteUser.php][WCOnlineOfficeModule.php]

## 2026-04-22 - version 3.19.9
* Remove unnecessary symbols from the phone number. [WCAccountModule.php]

## 2026-04-13 - version 3.19.8
* Added `mlmsoft_integration_get_invoice_data` filter. [MLMSoftWCOrder.php]
* MLMSoftAdminExtraPanel v.14
  * Added `Get Queue Status` button (API inspect tab).
  * Renamed selection items in the payment module drop-down list (Translations tab).
  * The `axios` module has been removed from the source code.

## 2026-03-15 - version 3.19.7
* Added options to the error handling form.
  * Added `sequence`, `interval` options. [MLMSoftErrorHandlingForm.php]
  * Added `saveFields` method. [MLMSoftErrorHandlingForm.php]
  * Added property `errorHandlingProps`. [MLMSoftOptions.php]
  * MLMSoftAdminExtraPanel v.1.12.0
  
## 2026-03-12 - version 3.19.6
* Added support for handling NRM API errors (500-504).
  * MLMSoftAdminExtraPanel v.1.10.0
  * Added `MLMSoftApiErrorHandler` class. [MLMSoftApiErrorHandler.php]
  * Added `MLMSoftErrorHandlingForm` class. [MLMSoftErrorHandlingForm.php]
  * Added `PLUGIN_NOTE_PREFIX` const. [MLMSoftPlugin.php]
  * Using the scheduler to create requests after API errors occur. [MLMSoftApi3.php]
* Fixed issue with `WPML Multilingual CMS` plugin. [MLMSoftAdminExtraPanel.php]

## 2026-02-12 - version 3.19.5
* Refactoring the code for the `showShortInfo` function. [EWalletCouponFrontend.php]

## 2026-02-12 - version 3.19.4
* Prevent coupon from being permanently deleted from trash for all roles except administrator. [EWalletCouponFrontend.php]

## 2026-02-11 - version 3.19.3
* Updated content `EWallet info` tab on coupon page in the admin area. [EWalletCouponFrontend.php]
  * Added link to parent order.
  * Added warning message.
  * Added translations.

## 2026-02-09 - version 3.19.2
* Added an order ID to coupons for easy searching in the admin area. [WCAdmin.php]
* Refactoring code to handle expired coupons. [EWalletCouponModule.php]

## 2026-02-04 - version 3.19.1
* MLMSoftAdminExtraPanel v.1.9.0

## 2026-02-02 - version 3.19.0
* Removed POS integration completely. [integrations/pos/, MLMSoftPlugin.php, frontend/admin, frontend/public-components, frontend/common, languages/]
	* Deleted `PosIntegration` class and related files. [integrations/pos/]
	* Removed POS from admin panel menu and routes. [frontend/admin/src/]
	* Removed `PosWarehouseSelect` component. [frontend/public-components/src/components/posWarehouseSelect/]
	* Removed `PosWarehouse` model. [frontend/common/src/models/api/PosWarehouse.ts]
	* Removed POS translations. [languages/]

## 2026-02-02 - version 3.18.0
* Removed unused API2 code. [MLMSoftPlugin.php, MLMSoftOptions.php, MLMSoftAdminPanel.php, routes/index.ts, api/index.vue]
	* Deleted `MLMSoftApi2` class and related files. [core/api/api2/]
	* Removed API2 settings section from admin panel. [api/index.vue]
	* Removed `api2token` option. [MLMSoftOptions.php]
	* Removed deprecated-api2 CSS class management. [MLMSoftAdminPanel.php]

## 2026-01-23 - version 3.17.3
* Fixed navigation: clicking on the first menu item "MLM Soft" now opens the "Base" tab by default. [routes/index.ts]

## 2026-01-19 - version 3.17.2
* Added new action. [MLMSoftAdminExtraPanel.php]
* Fixed setting `thirdPartyModules` prop. [MLMSoftAdminExtraPanel.php]
* Assets code refactoring.
* Added `shipping_cost` prop. [MLMSoftWCOrder.php]

## 2026-01-15 - version 3.17.1
* Added 4th parameter string $group to `as_schedule_single_action` function. [EWalletCartHelper.php]
* Using an set of statuses to cancel orders that were not paid on time. [EWalletCouponModule.php]
* Do not cancel the coupon separately from the order to avoid case when the buyer can pay for the order with the canceled coupon. [EWalletCouponModule.php]

## 2026-01-13 - version 3.17.0
* New feature for payment gateway:
	* Replaced hardcoded wallet operation IDs with dynamic dropdowns in WooCommerce Payment Gateway settings. [WCAdminApi.php]
	* The dropdowns now load all wallet operation types from API with pagination support.
	* Added operation type filtering: OUT operations for payment field, IN operations for cancel payment field.
	* Operation types are parsed from API response and filtered on frontend to prevent incorrect selection.
* Removed API2 settings section from API options page. Only API3 settings are now displayed.

## 2026-01-12 - version 3.16.0
* New feature: Added the ability to translate payment module strings.
* Fixed issue with `WPML Multilingual CMS` plugin. [MLMSoftAdminExtraPanel.php]

## 2025-12-24 - version 3.15.14
* Fixed path to MLMSoftProductInterface. [MLMSoftWCProductVariation.php]

## 2025-12-24 - version 3.15.13
* Added tax to cart&order subtotal. [EWalletApi.php]

## 2025-12-22 - version 3.15.12
* Increase axios timeouts.

## 2025-12-17 - version 3.15.11
* Check the result of the `cancelOrder` function before proceeding. [EWalletCouponModule.php]

## 2025-12-15 - version 3.15.10
* New feature: Added the ability to use product variations.
	* Added `ProductTrait` class. [ProductTrait.php]
	* Added `MLMSoftWCProductVariation` class. [MLMSoftWCProductVariation.php]
	* Added `MLMSoftProductInterface` class. [MLMSoftProductInterface.php]
	* Updated `MLMSoftWCProduct` class. [MLMSoftWCProduct.php]
	* Updated `MLMSoftWCOrder` class. [MLMSoftWCOrder.php]

## 2025-12-10 - version 3.15.9
* Added the constant `MLMSOFT_PREVENT_CHECKING_APPLYING_COUPON` to prevent checking for applying coupon. This applies when using coupons other than `fixed_cart`.

## 2025-12-08 - version 3.15.8
* Prevent the use of a second coupon for the same order on the checkout page.

## 2025-12-05 - version 3.15.7
* Fixed the coupon be cancelled if it had already been used in an order.

## 2025-12-04 - version 3.15.6
* Using the `wooCheckoutPreserveShippingMethod` option to preserve the shipping method when applying an EWallet coupon.
* The rule to cancel an unpaid order with an expired coupon has been changed.
* Using the `woocommerce_blocks_loaded` action is deprecated. [WCPaymentBlockModule.php]
* MLMSoftAdminExtraPanel v.1.5.0
* Added new params for `MLMSoftWooCheckoutSupportForm`.
* Updated extra options, eWallet Block assets.

## 2025-12-01 - version 3.15.5
* Added new Checkout options tab.
* Added `woo_checkout_preserve_shipping_method` option.
* Woocommerce block support tab is deprecated.

## 2025-11-28 - version 3.15.4
* Added routing to the extra options page.

## 2025-11-26 - version 3.15.3
* Fixed issue with shipping method reset when applying bonus coupon. The selected shipping method is now preserved after applying eWallet coupon if it's still available. [EWalletCartHelper.php]

## 2025-11-24 - version 3.15.2
* Added routing for extra options page.

## 2025-11-20 - version 3.15.1
* Updated `About form fields` description. [AboutFormFields.php]
* Updated translations for extra options page. [MLMSoftAdminExtraPanel.php]
* Updated CSS rules for extra options page. [mlmsoft-extra-options.min.css]

## 2025-11-17 - version 3.15.0
* The `billing_phone` field can be added to the `my-account` registration form and processed before account creation.

## 2025-10-31 - version 3.14.0
* Storing the volume product fields (@see `volume_product_fields` option) to order meta.

## 2025-10-21 - version 3.13.0
* Using `has_block_in_checkout` function in `shippingMethodsUpdated` method. [EWalletBlockCartModule.php]
* Using `admin_notices` action instead of `wc_add_notice` function. [WCAccountModule.php]
* Added own `userProfileUpdate` callback function to `edit_user_profile_update` action. [WCAccountModule.php]
* Added a second attempt to save account data if an "Error while editing profile field" occurs. [WCAccountModule.php]

## 2025-10-20 - version 3.12.0
* Added `EWalletBlockCartHelper`, `EWalletBlockCartModule` classes.
* Updated `MLMSoftEWalletBlockGateway` class. [MLMSoftEWalletBlockGateway.php]
* Updated assets for `MLMSoftEWalletBlockGateway` class.
* Updated `MLMSoftEWalletGateway` class. [MLMSoftEWalletGateway.php]
* Updated `EWalletCartHelper` class. [EWalletCartHelper.php]

## 2025-10-17 - version 3.11.0
* Before remove the coupon, check the order status. [EWalletCartModule.php]
* Cancel an order containing an expired coupon. [EWalletCouponModule.php]

## 2025-10-15 - version 3.10.0
* If the coupon was created with an amount equal to 0, then you need to give the option to delete it. [EWalletCouponFrontend.php]
* Added filter for API error response. [MLMSoftApi3.php]

## 2025-10-09 - version 3.9.10
* Updated localization. [WCAccountModule.php]
* Updated PO/MO translations files.

## 2025-09-15 - version 3.9.9
* Updated `WCPaymentModule`, `MLMSoftEWalletBlockGateway` classes.
* Updated translations.

## 2025-09-12 - version 3.9.8
* Override payment localizations from WP on the checkout page in the payment module.

## 2025-08-12 - version 3.9.7
* Added automatic order note `[MSI] Order loaded to NRM` when volumes are successfully sent to MLM Soft. [WCOrderModule.php]
* Added translation support for order notes in Russian and English.

## 2025-07-22 - version 3.9.6
* Prevent coupon being removed using ajax action. [MLM-3163] [EWalletCouponModule.php]
* Prevent the removing of the coupon and the return of points to the bonus wallet in case of problems on the payment system payment page. [MLM-3172] [EWalletCartModule.php]

## 2025-07-01 - version 3.9.5
* Updated `EWalletCouponFrontend` class. [EWalletCouponFrontend.php]
* Prevent coupon being removed from URL. See an issue [MLM-3112] [EWalletCouponModule.php]

## 2025-06-08 - version 3.9.4
* Updated `EWalletCouponFrontend` class. See an issue [MLM-3029] [EWalletCouponFrontend.php]
* Block login for user blocked in NRM [MLM-3033]. [MLMSoftRemoteUser.php]
* Updated translations.

## 2025-06-04 - version 3.9.3
* Fixed an issue [MLM-3029] with cancel of coupon for completed orders. [EWalletCouponFrontend.php]
* Added localization for the payment module. [WCPaymentModule.php]

## 2025-03-24 - version 3.9.2
* EWalletApi: Added shipping tax to `shipping_total` property before creating coupon.

## 2025-03-17 - version 3.9.1
* Updated Extra Options admin page.
* Added support for external modules to prevent conflicts.
* Added translations.

## 2025-03-12 - version 3.9.0
* Added Extra Options admin page.
* Added support for Woocommerce blocks on the checkout page.
* New translations added.

## 2025-02-24 - version 3.8.4
* Changed text domain.
* Updated po/mo files.
* Add `mlmsoft_integration_translate` filter [class `MLMSoftPlugin`].

## 2025-02-21 - version 3.8.3
* Added the ability to go from the registration page to the OnlineOffice immediately after registration.

## 2025-02-20 - version 3.8.2
* Added class `deprecated-api2` to properly manage element visibility.

## 2025-02-17 - version 3.8.1
* Update deploy.sh

## 2025-01-31 - version 3.8.0
* Deprecated Api2.

## 2024-12-27 - version 3.7.2
* Added `simple-number-input` prop for EWallet payment component.
* Added filter the properties for EWallet payment component.

## 2024-12-23 - version 3.7.1
* EWalletApi: Added filter before creating a coupon.
* EWalletCartModule: Added filter for customizing translation.
* EWalletOrder: Fixed getting $operationTypeId.
* WCAccountModule: Added checking the payment method.
* WCAccountModule: Added filter for customizing translation.
* MLMSoftEWalletGateway: Added filter for customizing translation.

## 2024-11-27 - version 3.7.0
* Added WCOnlineOfficeModule.
* Tested up WP to: 6.7

## 2024-11-02 - version 3.6.7
* Added `key` prop for `showComponent` function in `MLMSoftEWalletGateway` class.
* Tested up WP to: 6.6

## 2024-09-04 - version 3.6.6
* Possibility of using custom CSS for checkout page.

## 2024-07-08 - version 3.6.5
* Tested up to: 6.5
* Updated translations.

## 2024-07-04 - version 3.6.4
* Added  a `registration_sponsor_field_attribute` option.
* Remove red error (issue MLM-1101).

## 2024-06-05 - version 3.6.3
* Using the walletId in the coupon code and $couponItems.

## 2024-03-04 - version 3.6.2
* Added use of the `sponsorID` field from the plugin on the `my-account` and `checkout` pages.

## 2024-03-01 - version 3.6.1
* A second e-wallet has been added.

## 2024-02-21 - version 3.5.8
* Small css and translation fixes.

## 2024-01-31 - version 3.5.7
* Checking the activity of coupons to prevent incorrect use of the e-wallet.

## 2024-01-23 - version 3.5.5
* Added $domainSignature property to the documentPayload array.

## 2023-12-21 - version 3.5.4
* Замена `add_post_meta` на `update_post_meta` чтобы не добавлять несколько мета.

## 2023-12-27 - version 3.5.4
* Fix the layout in coupon option tab.

## 2023-11-03 - version 3.5.2
* Редирект после аутентификации из внешнего сервиса на заданую в опциях страницу.

## 2023-10-30 - version 3.5.1
* Добавлена аутентификация из внешнего сервиса.

## 2023-07-27 - version 3.4.13
* Class `MLMSoftAccountInfoBlock`: Typecast to prevent `PHP Fatal error: Argument $haystack must be of type array, string given` in in_array function.
* Class `MLMSoftLocalUser`: Using `update_user_meta` function only to prevent adding multiple meta for each update.
  ( @see Description https://developer.wordpress.org/reference/functions/update_user_meta/ )
* Class `MLMSoftAdminPanel`: Revising of the function with the addition of an action.
