Changeset 3376875
- Timestamp:
- 10/12/2025 09:14:46 AM (6 months ago)
- Location:
- mlm-soft-integration/trunk
- Files:
-
- 8 edited
-
CHANGELOG.md (modified) (1 diff)
-
integrations/woocommerce/modules/WCAccountModule.php (modified) (7 diffs)
-
languages/mlmsoft-integration-en_US.mo (modified) (previous)
-
languages/mlmsoft-integration-en_US.po (modified) (1 diff)
-
languages/mlmsoft-integration-ru_RU.mo (modified) (previous)
-
languages/mlmsoft-integration-ru_RU.po (modified) (1 diff)
-
languages/mlmsoft-integration.pot (modified) (1 diff)
-
mlm-soft-integration.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mlm-soft-integration/trunk/CHANGELOG.md
r3362112 r3376875 3 3 ## Changelog ## 4 4 5 ## 2025-08-15 - version 3.9.9 5 ## 2025-10-09 - version 3.9.10 6 * Updated localization. [WCAccountModule.php] 7 * Updated PO/MO translations files. 8 9 ## 2025-09-15 - version 3.9.9 6 10 * Updated `WCPaymentModule`, `MLMSoftEWalletBlockGateway` classes. 7 11 * Updated translations. -
mlm-soft-integration/trunk/integrations/woocommerce/modules/WCAccountModule.php
r3212008 r3376875 46 46 */ 47 47 add_filter('woocommerce_registration_errors', array($this, 'checkPaymentMethod'), 9, 3); 48 48 49 49 add_filter('woocommerce_registration_errors', array($this, 'checkRegistrationPossibility'), 10, 3); 50 50 add_filter('woocommerce_new_customer_data', array($this, 'newCustomerData'), 100, 2); … … 56 56 * @since 3.6.2 57 57 */ 58 add_action('woocommerce_register_form', array($this, 'addSponsorField'), 1); 59 } 60 58 add_action('woocommerce_register_form', array($this, 'addSponsorField'), 1); 59 } 60 61 61 /** 62 62 * Add a sponsor field to my-account page. … … 66 66 public function addSponsorField() 67 67 { 68 68 69 69 $sponsorFieldStatus = $this->options->registrationSponsorFieldStatus; 70 70 71 if ( empty($sponsorFieldStatus) || 'disabled' === $sponsorFieldStatus) {72 return; 73 } 74 71 if (empty($sponsorFieldStatus) || 'disabled' === $sponsorFieldStatus) { 72 return; 73 } 74 75 75 $value = !empty($_POST[WCIntegration::SPONSOR_ID_FIELD_NAME]) ? $_POST[WCIntegration::SPONSOR_ID_FIELD_NAME] : ''; 76 76 if (!$value && !empty($_COOKIE[MLMSoftPlugin::REFERRAL_COOKIE_NAME])) { … … 81 81 } 82 82 } 83 83 84 84 $field = WCCheckoutModule::getSponsorIdField(); 85 86 woocommerce_form_field(WCIntegration::SPONSOR_ID_FIELD_NAME, $field, $value); 85 86 woocommerce_form_field(WCIntegration::SPONSOR_ID_FIELD_NAME, $field, $value); 87 87 } 88 88 … … 100 100 public function checkPaymentMethod($errors, $username, $email) 101 101 { 102 if ( is_checkout()) {103 104 if ( ! empty($_POST['payment_method']) && $_POST['payment_method'] === MLMSoftEWalletGateway::GATEWAY_ID) {105 102 if (is_checkout()) { 103 104 if (!empty($_POST['payment_method']) && $_POST['payment_method'] === MLMSoftEWalletGateway::GATEWAY_ID) { 105 106 106 /** 107 107 * @see mlm-soft-integration\integrations\woocommerce\paymentGateways\eWallet\MLMSoftEWalletGateway.php 108 108 */ 109 109 $message = apply_filters( 110 'mlmsoft_integration_checkout_ewallet_payments_message', 110 'mlmsoft_integration_checkout_ewallet_payments_message', 111 111 MLMSoftPlugin::translate('This payment system is not meant for direct payments.') 112 ); 113 114 if ( ! empty($message) ) {112 ); 113 114 if (!empty($message)) { 115 115 $errors->add('error', $message, 'error'); 116 116 } 117 117 } 118 118 } 119 119 120 120 return $errors; 121 121 } 122 122 123 123 /** 124 124 * @param WP_Error $errors … … 136 136 137 137 if ($accountExists) { 138 $errors->add('error!', 'User with this email already exists.', 'error'); 138 /** 139 * @since 3.9.10 140 */ 141 $errors->add('error', __('User with this email already exists.', 'mlmsoft-integration'), 'error'); 139 142 return $errors; 140 143 } … … 165 168 $login = wc_strtolower($newUser['user_email']); 166 169 $password = $newUser['user_pass']; 167 $sponsorId = $referral ? (int) $referral->getAccountField('id', 0) : 0;170 $sponsorId = $referral ? (int) $referral->getAccountField('id', 0) : 0; 168 171 169 172 $profile = [ -
mlm-soft-integration/trunk/languages/mlmsoft-integration-en_US.po
r3362112 r3376875 241 241 msgid "optional" 242 242 msgstr "optional" 243 244 msgid "User with this email already exists." 245 msgstr "User with this email already exists." -
mlm-soft-integration/trunk/languages/mlmsoft-integration-ru_RU.po
r3362112 r3376875 241 241 msgid "optional" 242 242 msgstr "необязательно" 243 244 msgid "User with this email already exists." 245 msgstr "Пользователь с таким адресом электронной почты уже существует." -
mlm-soft-integration/trunk/languages/mlmsoft-integration.pot
r3362112 r3376875 237 237 msgid "optional" 238 238 msgstr "" 239 240 msgid "User with this email already exists." 241 msgstr "" -
mlm-soft-integration/trunk/mlm-soft-integration.php
r3362112 r3376875 4 4 Plugin Name: MLM Soft Integration 5 5 Description: WP integration with mlm-soft.com cloud platform 6 Version: 3.9. 96 Version: 3.9.10 7 7 Author: MLM Soft Ltd. 8 8 Author URI: https://mlm-soft.com
Note: See TracChangeset
for help on using the changeset viewer.