Changeset 3033463
- Timestamp:
- 02/09/2024 05:36:02 AM (2 years ago)
- Location:
- bonus-plus-wp
- Files:
-
- 12 edited
- 1 copied
-
tags/2.9 (copied) (copied from bonus-plus-wp/trunk)
-
tags/2.9/assets/customer.js (modified) (3 diffs)
-
tags/2.9/bonus-plus-wp.php (modified) (2 diffs)
-
tags/2.9/inc/ApiHelper.php (modified) (1 diff)
-
tags/2.9/inc/RestApiEndpoints.php (modified) (3 diffs)
-
tags/2.9/inc/WooAccount.php (modified) (1 diff)
-
tags/2.9/readme.txt (modified) (1 diff)
-
trunk/assets/customer.js (modified) (3 diffs)
-
trunk/bonus-plus-wp.php (modified) (2 diffs)
-
trunk/inc/ApiHelper.php (modified) (1 diff)
-
trunk/inc/RestApiEndpoints.php (modified) (3 diffs)
-
trunk/inc/WooAccount.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bonus-plus-wp/tags/2.9/assets/customer.js
r3033150 r3033463 16 16 } 17 17 18 // if (typeof params['card_number'] != 'undefined' && params['card_number'] != null ){19 // }20 21 18 // Регистрация 22 19 if (isElemetsExist){ … … 95 92 beforeSend: function ( xhr ) { 96 93 show(document.getElementById("loader")); 97 hide(document.getElementById("bpwp-registration"));98 94 hide(document.getElementById("bpwp-verify-start")); 99 95 hide(document.getElementById("bpmsg")); … … 111 107 show(document.getElementById('bpmsg')); 112 108 show(document.getElementById("bpwp-verify-end")); 113 hide(document.getElementById("bpwp-registration"));114 109 115 110 document.getElementById("bpwpSendOtp").addEventListener("click", function() { -
bonus-plus-wp/tags/2.9/bonus-plus-wp.php
r3033150 r3033463 15 15 * WP requires at least: 6.0 16 16 * Tested up to: 6.4.2 17 * Version: 2. 817 * Version: 2.9 18 18 */ 19 19 namespace BPWP; … … 28 28 public static function init() 29 29 { 30 define('BPWP_PLUGIN_VERSION', '2. 8');30 define('BPWP_PLUGIN_VERSION', '2.9'); 31 31 32 32 require_once __DIR__ . '/functions.php'; -
bonus-plus-wp/tags/2.9/inc/ApiHelper.php
r3033150 r3033463 118 118 'quantity' => $quantity 119 119 ); 120 do_action('logger', $items);121 122 120 } 123 121 -
bonus-plus-wp/tags/2.9/inc/RestApiEndpoints.php
r3033150 r3033463 117 117 ); 118 118 119 do_action('logger', $res);120 121 119 // Если 204 - успех, создаем клиента: запрос POST /customer, phone обязательно 122 120 if ($res['code'] == 204) { … … 126 124 ); 127 125 128 // TODO: Добавить запрос проверки существования пользвателя в б+ 126 // Код верный. Запрос проверки существования пользвателя в б+ 127 // Если такой номер существует, обновляем мета и редиректим 129 128 $get_customer = bpwp_api_request( 130 129 'customer', … … 134 133 'GET', 135 134 ); 136 135 137 136 if ($get_customer['code'] == 200) { 137 138 update_user_meta($user_id, 'bonus-plus', $get_customer['request']); 138 139 $response = array( 139 'success' => false, 140 'message' => 'Ошибка. Пользователь уже существует!', 140 'success' => true, 141 'message' => 'Пользователь уже существует!', 142 'customer_created' => true, // проверим и редиректим на /my-account/bonus-plus/ 141 143 ); 142 144 wp_send_json($response); 143 145 wp_die(); 144 146 } 145 147 146 148 $customer = bpwp_api_request( 147 149 'customer', -
bonus-plus-wp/tags/2.9/inc/WooAccount.php
r3033150 r3033463 258 258 <!-- <div id="qrcode" style="display:none;"></div> --> 259 259 260 <div id='bpwp-registration' >260 <div id='bpwp-registration' style="display:none;"> 261 261 <p><?php echo __('Вы еще не зарегистрированы в программе лояльности', 'bonus-plus-wp') ?></p> 262 262 </div> -
bonus-plus-wp/tags/2.9/readme.txt
r3033150 r3033463 93 93 == Changelog == 94 94 95 = 2.9 = 96 - линковка существующего клиента из б+ https://github.com/evgrezanov/bonus-plus-wp/issues/42 97 95 98 = 2.8 = 96 99 - убрали поле "дата рождения" из личного кабинета https://github.com/evgrezanov/bonus-plus-wp/issues/58 -
bonus-plus-wp/trunk/assets/customer.js
r3033150 r3033463 16 16 } 17 17 18 // if (typeof params['card_number'] != 'undefined' && params['card_number'] != null ){19 // }20 21 18 // Регистрация 22 19 if (isElemetsExist){ … … 95 92 beforeSend: function ( xhr ) { 96 93 show(document.getElementById("loader")); 97 hide(document.getElementById("bpwp-registration"));98 94 hide(document.getElementById("bpwp-verify-start")); 99 95 hide(document.getElementById("bpmsg")); … … 111 107 show(document.getElementById('bpmsg')); 112 108 show(document.getElementById("bpwp-verify-end")); 113 hide(document.getElementById("bpwp-registration"));114 109 115 110 document.getElementById("bpwpSendOtp").addEventListener("click", function() { -
bonus-plus-wp/trunk/bonus-plus-wp.php
r3033150 r3033463 15 15 * WP requires at least: 6.0 16 16 * Tested up to: 6.4.2 17 * Version: 2. 817 * Version: 2.9 18 18 */ 19 19 namespace BPWP; … … 28 28 public static function init() 29 29 { 30 define('BPWP_PLUGIN_VERSION', '2. 8');30 define('BPWP_PLUGIN_VERSION', '2.9'); 31 31 32 32 require_once __DIR__ . '/functions.php'; -
bonus-plus-wp/trunk/inc/ApiHelper.php
r3033150 r3033463 118 118 'quantity' => $quantity 119 119 ); 120 do_action('logger', $items);121 122 120 } 123 121 -
bonus-plus-wp/trunk/inc/RestApiEndpoints.php
r3033150 r3033463 117 117 ); 118 118 119 do_action('logger', $res);120 121 119 // Если 204 - успех, создаем клиента: запрос POST /customer, phone обязательно 122 120 if ($res['code'] == 204) { … … 126 124 ); 127 125 128 // TODO: Добавить запрос проверки существования пользвателя в б+ 126 // Код верный. Запрос проверки существования пользвателя в б+ 127 // Если такой номер существует, обновляем мета и редиректим 129 128 $get_customer = bpwp_api_request( 130 129 'customer', … … 134 133 'GET', 135 134 ); 136 135 137 136 if ($get_customer['code'] == 200) { 137 138 update_user_meta($user_id, 'bonus-plus', $get_customer['request']); 138 139 $response = array( 139 'success' => false, 140 'message' => 'Ошибка. Пользователь уже существует!', 140 'success' => true, 141 'message' => 'Пользователь уже существует!', 142 'customer_created' => true, // проверим и редиректим на /my-account/bonus-plus/ 141 143 ); 142 144 wp_send_json($response); 143 145 wp_die(); 144 146 } 145 147 146 148 $customer = bpwp_api_request( 147 149 'customer', -
bonus-plus-wp/trunk/inc/WooAccount.php
r3033150 r3033463 258 258 <!-- <div id="qrcode" style="display:none;"></div> --> 259 259 260 <div id='bpwp-registration' >260 <div id='bpwp-registration' style="display:none;"> 261 261 <p><?php echo __('Вы еще не зарегистрированы в программе лояльности', 'bonus-plus-wp') ?></p> 262 262 </div> -
bonus-plus-wp/trunk/readme.txt
r3033150 r3033463 93 93 == Changelog == 94 94 95 = 2.9 = 96 - линковка существующего клиента из б+ https://github.com/evgrezanov/bonus-plus-wp/issues/42 97 95 98 = 2.8 = 96 99 - убрали поле "дата рождения" из личного кабинета https://github.com/evgrezanov/bonus-plus-wp/issues/58
Note: See TracChangeset
for help on using the changeset viewer.