Changeset 2627045
- Timestamp:
- 11/10/2021 01:24:48 AM (4 years ago)
- Location:
- bonus-plus-wp/trunk
- Files:
-
- 3 edited
-
bonus-plus-wp.php (modified) (2 diffs)
-
inc/ClientProfile.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bonus-plus-wp/trunk/bonus-plus-wp.php
r2623740 r2627045 15 15 * WP requires at least: 5.0 16 16 * Tested up to: 5.8 17 * Version: 2. 017 * Version: 2.2 18 18 */ 19 19 namespace BPWP; … … 28 28 public static function init() 29 29 { 30 define('BPWP_PLUGIN_VERSION', '2. 0');30 define('BPWP_PLUGIN_VERSION', '2.1'); 31 31 32 32 require_once __DIR__ . '/functions.php'; -
bonus-plus-wp/trunk/inc/ClientProfile.php
r2623740 r2627045 153 153 { 154 154 $user_id = $user->ID; 155 delete_user_meta($user_id, 'bonus-plus'); 156 // Check billing_phone 157 $phone = bpwp_api_get_customer_phone($user_id); 155 158 // Если у пользователя есть мета bonus-plus, значит телефон ранее верифицирован 156 if (!empty(get_user_meta($user_id, 'bonus-plus', true))){159 // if (!empty(get_user_meta($user_id, 'bonus-plus', true))){ 157 160 // Значит обновим данные 158 $phone = bpwp_api_get_customer_phone($user_id);159 $isPhoneVerified = get_user_meta($user_id, 'bpwp_phone_verified', true);160 if (!empty($phone) && $isPhoneVerified) {161 //$phone = bpwp_api_get_customer_phone($user_id); 162 //$isPhoneVerified = get_user_meta($user_id, 'bpwp_phone_verified', true); 163 if (!empty($phone)) { 161 164 $res = bpwp_api_request( 162 165 'customer', … … 166 169 'GET' 167 170 ); 168 update_user_meta($user_id, 'bonus-plus', $res['request']); 169 } else { 171 if ($res['code'] == 200){ 172 update_user_meta($user_id, 'bonus-plus', $res['request']); 173 } else { 174 do_action( 175 'bpwp_logger', 176 $type = __CLASS__, 177 $title = __('Ошибка при получении данных клиента', 'bonus-plus-wp'), 178 $desc = sprintf(__('У пользователя с ИД %s, данные не получены!', 'bonus-plus-wp'), $user_id), 179 ); 180 } 181 182 } else { 170 183 do_action( 171 184 'bpwp_logger', … … 175 188 ); 176 189 } 177 }190 //} 178 191 } 179 192 -
bonus-plus-wp/trunk/readme.txt
r2623740 r2627045 5 5 Requires at least: 4.0 6 6 Tested up to: 5.8 7 Stable tag: 2. 07 Stable tag: 2.2 8 8 Requires PHP: 7.1 9 9 License: GPLv2 or later … … 93 93 == Changelog == 94 94 95 = 2.1 = 96 - clear client meta after login 97 - include account.js at my-account page 98 95 99 = 2.0 = 96 100 - add registration interface at my-account
Note: See TracChangeset
for help on using the changeset viewer.