Plugin Directory

Changeset 3376875


Ignore:
Timestamp:
10/12/2025 09:14:46 AM (6 months ago)
Author:
mlmsoft
Message:

Version 3.9.10

Location:
mlm-soft-integration/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • mlm-soft-integration/trunk/CHANGELOG.md

    r3362112 r3376875  
    33## Changelog ##
    44
    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
    610* Updated `WCPaymentModule`, `MLMSoftEWalletBlockGateway` classes.
    711* Updated translations.
  • mlm-soft-integration/trunk/integrations/woocommerce/modules/WCAccountModule.php

    r3212008 r3376875  
    4646         */
    4747        add_filter('woocommerce_registration_errors', array($this, 'checkPaymentMethod'), 9, 3);
    48        
     48
    4949        add_filter('woocommerce_registration_errors', array($this, 'checkRegistrationPossibility'), 10, 3);
    5050        add_filter('woocommerce_new_customer_data', array($this, 'newCustomerData'), 100, 2);
     
    5656         * @since 3.6.2
    5757         */
    58         add_action('woocommerce_register_form', array($this, 'addSponsorField'), 1);       
    59     }
    60    
     58        add_action('woocommerce_register_form', array($this, 'addSponsorField'), 1);
     59    }
     60
    6161    /**
    6262     * Add a sponsor field to my-account page.
     
    6666    public function addSponsorField()
    6767    {
    68        
     68
    6969        $sponsorFieldStatus = $this->options->registrationSponsorFieldStatus;
    7070
    71         if ( empty($sponsorFieldStatus) || 'disabled' === $sponsorFieldStatus ) {
    72             return;
    73         }
    74        
     71        if (empty($sponsorFieldStatus) || 'disabled' === $sponsorFieldStatus) {
     72            return;
     73        }
     74
    7575        $value = !empty($_POST[WCIntegration::SPONSOR_ID_FIELD_NAME]) ? $_POST[WCIntegration::SPONSOR_ID_FIELD_NAME] : '';
    7676        if (!$value && !empty($_COOKIE[MLMSoftPlugin::REFERRAL_COOKIE_NAME])) {
     
    8181            }
    8282        }
    83        
     83
    8484        $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);
    8787    }
    8888
     
    100100    public function checkPaymentMethod($errors, $username, $email)
    101101    {
    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
    106106                /**
    107107                 * @see mlm-soft-integration\integrations\woocommerce\paymentGateways\eWallet\MLMSoftEWalletGateway.php
    108108                 */
    109109                $message = apply_filters(
    110                     'mlmsoft_integration_checkout_ewallet_payments_message', 
     110                    'mlmsoft_integration_checkout_ewallet_payments_message',
    111111                    MLMSoftPlugin::translate('This payment system is not meant for direct payments.')
    112                 ); 
    113                
    114                 if( ! empty($message) ) {   
     112                );
     113
     114                if (!empty($message)) {
    115115                    $errors->add('error', $message, 'error');
    116116                }
    117117            }
    118118        }
    119        
     119
    120120        return $errors;
    121121    }
    122    
     122
    123123    /**
    124124     * @param WP_Error $errors
     
    136136
    137137        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');
    139142            return $errors;
    140143        }
     
    165168        $login = wc_strtolower($newUser['user_email']);
    166169        $password = $newUser['user_pass'];
    167         $sponsorId = $referral ? (int)$referral->getAccountField('id', 0) : 0;
     170        $sponsorId = $referral ? (int) $referral->getAccountField('id', 0) : 0;
    168171
    169172        $profile = [
  • mlm-soft-integration/trunk/languages/mlmsoft-integration-en_US.po

    r3362112 r3376875  
    241241msgid "optional"
    242242msgstr "optional"
     243
     244msgid "User with this email already exists."
     245msgstr "User with this email already exists."
  • mlm-soft-integration/trunk/languages/mlmsoft-integration-ru_RU.po

    r3362112 r3376875  
    241241msgid "optional"
    242242msgstr "необязательно"
     243
     244msgid "User with this email already exists."
     245msgstr "Пользователь с таким адресом электронной почты уже существует."
  • mlm-soft-integration/trunk/languages/mlmsoft-integration.pot

    r3362112 r3376875  
    237237msgid "optional"
    238238msgstr ""
     239
     240msgid "User with this email already exists."
     241msgstr ""
  • mlm-soft-integration/trunk/mlm-soft-integration.php

    r3362112 r3376875  
    44Plugin Name: MLM Soft Integration
    55Description: WP integration with mlm-soft.com cloud platform
    6 Version: 3.9.9
     6Version: 3.9.10
    77Author: MLM Soft Ltd.
    88Author URI: https://mlm-soft.com
Note: See TracChangeset for help on using the changeset viewer.