Changeset 2855509
- Timestamp:
- 01/26/2023 10:08:40 PM (3 years ago)
- Location:
- avify
- Files:
-
- 24 added
- 14 deleted
- 20 edited
- 1 copied
-
tags/1.0.6 (copied) (copied from avify/trunk)
-
tags/1.0.6/.git/FETCH_HEAD (modified) (1 diff)
-
tags/1.0.6/.git/HEAD (modified) (1 diff)
-
tags/1.0.6/.git/config (modified) (1 diff)
-
tags/1.0.6/.git/index (modified) (previous)
-
tags/1.0.6/.git/logs/HEAD (modified) (1 diff)
-
tags/1.0.6/.git/objects/0c (deleted)
-
tags/1.0.6/.git/objects/3b (added)
-
tags/1.0.6/.git/objects/3b/3bdd78cb9939cbd7dc6dd9675823288bda993e (added)
-
tags/1.0.6/.git/objects/59 (deleted)
-
tags/1.0.6/.git/objects/5f (deleted)
-
tags/1.0.6/.git/objects/9c (added)
-
tags/1.0.6/.git/objects/9c/9749c13ad7311b88ff9c7a33a47e3e8cac1250 (added)
-
tags/1.0.6/.git/objects/ae (added)
-
tags/1.0.6/.git/objects/ae/dba559efd9103a4f6441a506ece066e744b922 (added)
-
tags/1.0.6/.git/objects/b9/cde937ff6170529b0882959496109ba4910df9 (deleted)
-
tags/1.0.6/.git/objects/d7 (added)
-
tags/1.0.6/.git/objects/d7/025ae34577f007dcf3dcb073ec762214f34b60 (added)
-
tags/1.0.6/.git/objects/da (added)
-
tags/1.0.6/.git/objects/da/80f16fea625b91cec0e00e27e67009419029f3 (added)
-
tags/1.0.6/.git/objects/ed (deleted)
-
tags/1.0.6/.git/objects/f4/18d6eca7ff3d27af52f5ba1f87eb8f4e929e75 (added)
-
tags/1.0.6/.git/objects/f4/6c5934af92c0905e0eb9392fdcd3ad8f103927 (deleted)
-
tags/1.0.6/.git/refs/tags/1.0.5 (deleted)
-
tags/1.0.6/.git/refs/tags/1.0.6 (added)
-
tags/1.0.6/.git/shallow (modified) (1 diff)
-
tags/1.0.6/README.md (modified) (4 diffs)
-
tags/1.0.6/avify-payments-initializer.php (modified) (2 diffs)
-
tags/1.0.6/avify-payments-shipping.php (modified) (5 diffs)
-
tags/1.0.6/readme.txt (modified) (3 diffs)
-
trunk/.git/FETCH_HEAD (modified) (1 diff)
-
trunk/.git/HEAD (modified) (1 diff)
-
trunk/.git/config (modified) (1 diff)
-
trunk/.git/index (modified) (previous)
-
trunk/.git/logs/HEAD (modified) (1 diff)
-
trunk/.git/objects/0c (deleted)
-
trunk/.git/objects/3b (added)
-
trunk/.git/objects/3b/3bdd78cb9939cbd7dc6dd9675823288bda993e (added)
-
trunk/.git/objects/59 (deleted)
-
trunk/.git/objects/5f (deleted)
-
trunk/.git/objects/9c (added)
-
trunk/.git/objects/9c/9749c13ad7311b88ff9c7a33a47e3e8cac1250 (added)
-
trunk/.git/objects/ae (added)
-
trunk/.git/objects/ae/dba559efd9103a4f6441a506ece066e744b922 (added)
-
trunk/.git/objects/b9/cde937ff6170529b0882959496109ba4910df9 (deleted)
-
trunk/.git/objects/d7 (added)
-
trunk/.git/objects/d7/025ae34577f007dcf3dcb073ec762214f34b60 (added)
-
trunk/.git/objects/da (added)
-
trunk/.git/objects/da/80f16fea625b91cec0e00e27e67009419029f3 (added)
-
trunk/.git/objects/ed (deleted)
-
trunk/.git/objects/f4/18d6eca7ff3d27af52f5ba1f87eb8f4e929e75 (added)
-
trunk/.git/objects/f4/6c5934af92c0905e0eb9392fdcd3ad8f103927 (deleted)
-
trunk/.git/refs/tags/1.0.5 (deleted)
-
trunk/.git/refs/tags/1.0.6 (added)
-
trunk/.git/shallow (modified) (1 diff)
-
trunk/README.md (modified) (4 diffs)
-
trunk/avify-payments-initializer.php (modified) (2 diffs)
-
trunk/avify-payments-shipping.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
avify/tags/1.0.6/.git/FETCH_HEAD
r2819318 r2855509 1 f46c5934af92c0905e0eb9392fdcd3ad8f103927 'f46c5934af92c0905e0eb9392fdcd3ad8f103927' of https://github.com/avify-com/avify-wordpress-plugin1 9c9749c13ad7311b88ff9c7a33a47e3e8cac1250 '9c9749c13ad7311b88ff9c7a33a47e3e8cac1250' of https://github.com/avify-com/avify-wordpress-plugin -
avify/tags/1.0.6/.git/HEAD
r2819318 r2855509 1 f46c5934af92c0905e0eb9392fdcd3ad8f103927 1 9c9749c13ad7311b88ff9c7a33a47e3e8cac1250 -
avify/tags/1.0.6/.git/config
r2850152 r2855509 10 10 auto = 0 11 11 [http "https://github.com/"] 12 extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX 1RjOVhMd2VsOTRRV0V5T2tlMjJpS05Hc3ZnY0lHRjJ5VEdpRQ==12 extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX3BNRXNFZloxOHpnQjlCc1FubXR4andtVGZUTmo2OTFEQ1lReQ== -
avify/tags/1.0.6/.git/logs/HEAD
r2850152 r2855509 1 0000000000000000000000000000000000000000 f46c5934af92c0905e0eb9392fdcd3ad8f103927 runner <runner@fv-az577-388.m1ymwixnccyeph3re32eo5iu0d.dx.internal.cloudapp.net> 1674004425 +0000 checkout: moving from master to refs/tags/1.0.51 0000000000000000000000000000000000000000 9c9749c13ad7311b88ff9c7a33a47e3e8cac1250 runner <runner@fv-az178-906.ou4bps3zwvpehennzi3rrspmbh.dx.internal.cloudapp.net> 1674770899 +0000 checkout: moving from master to refs/tags/1.0.6 -
avify/tags/1.0.6/.git/shallow
r2819318 r2855509 1 f46c5934af92c0905e0eb9392fdcd3ad8f103927 1 9c9749c13ad7311b88ff9c7a33a47e3e8cac1250 -
avify/tags/1.0.6/README.md
r2819318 r2855509 3 3 Tags: avify, checkout, orders, payment gateway, woocommerce 4 4 Requires at least: 5.6 5 Tested up to: 5.9.26 Stable tag: 1.0. 45 Tested up to: 6.1.1 6 Stable tag: 1.0.6 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 31 31 * Processing of payments in USD or CRC. 32 32 * Sandbox testing. 33 * S incronize orders33 * Synchronize orders 34 34 35 35 Do you want to know more about Avify? Please visit our [website](https://avify.com/) and find out what we can do. … … 58 58 ## Changelog 59 59 60 ### 1.0.6 61 62 * Upgrade tested up to. 63 64 ### 1.0.5 65 66 * Fix package bug. 67 60 68 ### 1.0.4 61 69 … … 66 74 * Remove avify url as default value. 67 75 68 = 1.0.2 = 76 ### 1.0.2 69 77 70 78 * Fixed bug when updating status of failed orders. -
avify/tags/1.0.6/avify-payments-initializer.php
r2819318 r2855509 7 7 * Plugin URI: 8 8 * Description: Connect your WooCommerce account to Avify and send all your orders to one centralized inventory. 9 * Version: 1.0. 49 * Version: 1.0.6 10 10 * Author: Avify 11 11 * Author URI: https://avify.com/ … … 13 13 * Domain Path: /languages/ 14 14 * Requires at least: 5.6 15 * Tested up to: 5.9.215 * Tested up to: 6.1.1 16 16 * Requires PHP: 7.0 17 17 */ -
avify/tags/1.0.6/avify-payments-shipping.php
r2819318 r2855509 109 109 { 110 110 //WC()->session->set('avify_lock', false); 111 111 112 $isCheckout = (is_checkout() || is_cart()); 113 112 114 if ($isCheckout && !WC()->session->get('avify_lock')) { 113 115 WC()->session->set('avify_lock', true); … … 124 126 $cart = WC()->cart; 125 127 126 /** Cart Sync **/127 /*$wooCartKey = $carUUID;128 if (!$wooCartKey) return null;129 avify_log('get avify shipping rates woo cart: ' . $wooCartKey);*/130 131 //Get from session132 /*$avifyQuoteId = WC()->session->get('avify_quote_' . $wooCartKey);133 if (!$avifyQuoteId) {134 $avifyQuoteId = create_avify_quote($AVIFY_URL, $AVIFY_SHOP_ID);135 } else {136 avify_log('validate -> ' . $avifyQuoteId);137 if($avifyQuoteId == 'loading') {138 WC()->session->set('avify_quote_' . $wooCartKey, null);139 return;140 }141 //Still valid?142 $responseHeaders = [];143 $avifyCookie = WC()->session->get('avify_quote_cookie_' . $wooCartKey);144 $avifyQuoteId = explode(':', $avifyQuoteId)[0];145 $avifyQuote = Curl::get($AVIFY_URL . "/rest/V1/guest-carts/{$avifyQuoteId}", [146 "Cookie: $avifyCookie"147 ], $responseHeaders);148 if (!$avifyQuote['success']) {149 $avifyQuoteId = create_avify_quote($AVIFY_URL, $AVIFY_SHOP_ID);150 } else {151 if(isset($responseHeaders['set-cookie'][0])) {152 WC()->session->set('avify_quote_cookie_' . $wooCartKey, $responseHeaders['set-cookie'][0]);153 }154 }155 }156 $avifyCookie = WC()->session->get('avify_quote_cookie_' . $wooCartKey);157 WC()->session->set('avify_lock', false);158 avify_log('avify quote id : ' . $avifyQuoteId);159 avify_log("avify cookie: $avifyCookie");*/160 161 //Local avify cart162 /*$cart = WC()->cart;163 $avifyLocalQuote = WC()->session->get('avify_local_quote_' . $wooCartKey);164 if ($avifyLocalQuote) {165 $avifyLocalQuote = json_decode($avifyLocalQuote, true);166 } else {167 $avifyLocalQuote = [];168 }*/169 170 //Update items171 /*foreach ($cart->get_cart() as $item) {172 $sku = $item['data']->get_meta( 'avify_sku', true );173 $update = false;174 $add = false;175 if (!isset($avifyLocalQuote[$sku])) {176 $add = true;177 avify_log("add item:{$sku}");178 } else {179 $avfLocalItem = explode(':', $avifyLocalQuote[$sku]);180 if (floatval($avfLocalItem[1]) != floatval($item['quantity'])) {181 $update = true;182 avify_log("update item {$avfLocalItem[0]}:{$sku}");183 }184 }185 186 if ($update || $add) {187 $url = $AVIFY_URL . "/rest/V1/guest-carts/{$avifyQuoteId}/items";188 $headers = [189 "Cookie: $avifyCookie",190 'Content-Type: application/json'191 ];192 $payload = json_encode([193 "cartItem" => [194 "sku" => $sku,195 "qty" => $item['quantity']196 ]197 ]);198 199 $avifyItem = null;200 if ($add) {201 $avifyItem = Curl::post(202 $url, $headers, $payload203 );204 } else {205 if (isset($avfLocalItem[0]) && $update) {206 $avifyItem = Curl::put(207 $url . "/{$avfLocalItem[0]}", $headers, $payload208 );209 }210 }211 if ($avifyItem) {212 avify_log($avifyItem);213 if ($avifyItem['success']) {214 $avifyLocalQuote[$sku] = $avifyItem['data']['item_id'] . ':' . $item['quantity'];215 } else {216 if(isset($avifyItem['httpCode'])) {217 if($avifyItem['httpCode'] == 404) {218 //Clear219 WC()->session->set('avify_quote_' . $wooCartKey, NULL);220 WC()->session->set('avify_shop_' . $wooCartKey, NULL);221 WC()->session->set('avify_local_quote_' . $wooCartKey, NULL);222 WC()->session->set('avify_cart_uuid', NULL);223 }224 }225 }226 }227 }228 }*/229 //Delete items230 /*foreach ($avifyLocalQuote as $avfSku => $avfLocalItem) {231 $found = false;232 foreach ($cart->get_cart() as $item) {233 $sku = $item['data']->get_meta( 'avify_sku', true );234 if ($sku == $avfSku) {235 $found = true;236 }237 }238 if (!$found) {239 $avfLocalItem = explode(':', $avfLocalItem);240 avify_log("delete item {$avfLocalItem[0]}:{$avfSku}");241 Curl::delete($AVIFY_URL . "/rest/V1/guest-carts/{$avifyQuoteId}/items/{$avfLocalItem[0]}",242 [243 "Cookie: $avifyCookie"244 ]245 );246 unset($avifyLocalQuote[$avfSku]);247 }248 }249 WC()->session->set('avify_local_quote_' . $wooCartKey, json_encode($avifyLocalQuote));*/250 251 /** Rates **/252 128 if (!isset($package['destination'])) { 253 129 WC()->session->set('avify_lock', false); … … 255 131 } 256 132 257 //Coords258 133 $latitude = isset($_POST['lpac_latitude']) ? sanitize_text_field($_POST['lpac_latitude']) : 0.00; 259 134 $longitude = isset($_POST['lpac_longitude']) ? sanitize_text_field($_POST['lpac_longitude']) : 0.00; … … 292 167 ]), $responseHeaders 293 168 ); 169 avify_log(json_encode($avifyRates)); 294 170 if (!isset($avifyRates['data'])) { 295 avify_log(' No rates found on avify...');171 avify_log('no rates found on avify.'); 296 172 avify_log($avifyRates); 297 173 WC()->session->set('avify_lock', false); … … 319 195 } 320 196 } 321 //shuffle($rates); 322 if(!$rates) { 323 WC()->session->set('avify_lock', false); 324 return; 325 } 197 326 198 foreach ($rates as $rate) { 327 199 $this->add_rate($rate); 328 200 } 201 329 202 WC()->session->set('avify_lock', false); 330 203 } else { 331 avify_log(WC()->session->get('avify_lock') ? 'locked. ..' : 'no-locked...');204 avify_log(WC()->session->get('avify_lock') ? 'locked.' : 'no-locked.'); 332 205 } 333 206 -
avify/tags/1.0.6/readme.txt
r2819318 r2855509 3 3 Tags: avify, checkout, orders, payment gateway, woocommerce 4 4 Requires at least: 5.6 5 Tested up to: 5.9.26 Stable tag: 1.0. 45 Tested up to: 6.1.1 6 Stable tag: 1.0.6 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 31 31 * Processing of payments in USD or CRC. 32 32 * Sandbox testing. 33 * S incronize orders33 * Synchronize orders 34 34 35 35 Do you want to know more about Avify? Please visit our [website](https://avify.com/) and find out what we can do. … … 58 58 == Changelog == 59 59 60 ### 1.0.4 60 ### 1.0.6 61 62 * Upgrade tested up to. 63 64 = 1.0.5 = 65 66 * Fix package bug. 67 68 = 1.0.4 = 61 69 62 70 * Improve Avify rates collect. -
avify/trunk/.git/FETCH_HEAD
r2819318 r2855509 1 f46c5934af92c0905e0eb9392fdcd3ad8f103927 'f46c5934af92c0905e0eb9392fdcd3ad8f103927' of https://github.com/avify-com/avify-wordpress-plugin1 9c9749c13ad7311b88ff9c7a33a47e3e8cac1250 '9c9749c13ad7311b88ff9c7a33a47e3e8cac1250' of https://github.com/avify-com/avify-wordpress-plugin -
avify/trunk/.git/HEAD
r2819318 r2855509 1 f46c5934af92c0905e0eb9392fdcd3ad8f103927 1 9c9749c13ad7311b88ff9c7a33a47e3e8cac1250 -
avify/trunk/.git/config
r2850152 r2855509 10 10 auto = 0 11 11 [http "https://github.com/"] 12 extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX 1RjOVhMd2VsOTRRV0V5T2tlMjJpS05Hc3ZnY0lHRjJ5VEdpRQ==12 extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX3BNRXNFZloxOHpnQjlCc1FubXR4andtVGZUTmo2OTFEQ1lReQ== -
avify/trunk/.git/logs/HEAD
r2850152 r2855509 1 0000000000000000000000000000000000000000 f46c5934af92c0905e0eb9392fdcd3ad8f103927 runner <runner@fv-az577-388.m1ymwixnccyeph3re32eo5iu0d.dx.internal.cloudapp.net> 1674004425 +0000 checkout: moving from master to refs/tags/1.0.51 0000000000000000000000000000000000000000 9c9749c13ad7311b88ff9c7a33a47e3e8cac1250 runner <runner@fv-az178-906.ou4bps3zwvpehennzi3rrspmbh.dx.internal.cloudapp.net> 1674770899 +0000 checkout: moving from master to refs/tags/1.0.6 -
avify/trunk/.git/shallow
r2819318 r2855509 1 f46c5934af92c0905e0eb9392fdcd3ad8f103927 1 9c9749c13ad7311b88ff9c7a33a47e3e8cac1250 -
avify/trunk/README.md
r2819318 r2855509 3 3 Tags: avify, checkout, orders, payment gateway, woocommerce 4 4 Requires at least: 5.6 5 Tested up to: 5.9.26 Stable tag: 1.0. 45 Tested up to: 6.1.1 6 Stable tag: 1.0.6 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 31 31 * Processing of payments in USD or CRC. 32 32 * Sandbox testing. 33 * S incronize orders33 * Synchronize orders 34 34 35 35 Do you want to know more about Avify? Please visit our [website](https://avify.com/) and find out what we can do. … … 58 58 ## Changelog 59 59 60 ### 1.0.6 61 62 * Upgrade tested up to. 63 64 ### 1.0.5 65 66 * Fix package bug. 67 60 68 ### 1.0.4 61 69 … … 66 74 * Remove avify url as default value. 67 75 68 = 1.0.2 = 76 ### 1.0.2 69 77 70 78 * Fixed bug when updating status of failed orders. -
avify/trunk/avify-payments-initializer.php
r2819318 r2855509 7 7 * Plugin URI: 8 8 * Description: Connect your WooCommerce account to Avify and send all your orders to one centralized inventory. 9 * Version: 1.0. 49 * Version: 1.0.6 10 10 * Author: Avify 11 11 * Author URI: https://avify.com/ … … 13 13 * Domain Path: /languages/ 14 14 * Requires at least: 5.6 15 * Tested up to: 5.9.215 * Tested up to: 6.1.1 16 16 * Requires PHP: 7.0 17 17 */ -
avify/trunk/avify-payments-shipping.php
r2819318 r2855509 109 109 { 110 110 //WC()->session->set('avify_lock', false); 111 111 112 $isCheckout = (is_checkout() || is_cart()); 113 112 114 if ($isCheckout && !WC()->session->get('avify_lock')) { 113 115 WC()->session->set('avify_lock', true); … … 124 126 $cart = WC()->cart; 125 127 126 /** Cart Sync **/127 /*$wooCartKey = $carUUID;128 if (!$wooCartKey) return null;129 avify_log('get avify shipping rates woo cart: ' . $wooCartKey);*/130 131 //Get from session132 /*$avifyQuoteId = WC()->session->get('avify_quote_' . $wooCartKey);133 if (!$avifyQuoteId) {134 $avifyQuoteId = create_avify_quote($AVIFY_URL, $AVIFY_SHOP_ID);135 } else {136 avify_log('validate -> ' . $avifyQuoteId);137 if($avifyQuoteId == 'loading') {138 WC()->session->set('avify_quote_' . $wooCartKey, null);139 return;140 }141 //Still valid?142 $responseHeaders = [];143 $avifyCookie = WC()->session->get('avify_quote_cookie_' . $wooCartKey);144 $avifyQuoteId = explode(':', $avifyQuoteId)[0];145 $avifyQuote = Curl::get($AVIFY_URL . "/rest/V1/guest-carts/{$avifyQuoteId}", [146 "Cookie: $avifyCookie"147 ], $responseHeaders);148 if (!$avifyQuote['success']) {149 $avifyQuoteId = create_avify_quote($AVIFY_URL, $AVIFY_SHOP_ID);150 } else {151 if(isset($responseHeaders['set-cookie'][0])) {152 WC()->session->set('avify_quote_cookie_' . $wooCartKey, $responseHeaders['set-cookie'][0]);153 }154 }155 }156 $avifyCookie = WC()->session->get('avify_quote_cookie_' . $wooCartKey);157 WC()->session->set('avify_lock', false);158 avify_log('avify quote id : ' . $avifyQuoteId);159 avify_log("avify cookie: $avifyCookie");*/160 161 //Local avify cart162 /*$cart = WC()->cart;163 $avifyLocalQuote = WC()->session->get('avify_local_quote_' . $wooCartKey);164 if ($avifyLocalQuote) {165 $avifyLocalQuote = json_decode($avifyLocalQuote, true);166 } else {167 $avifyLocalQuote = [];168 }*/169 170 //Update items171 /*foreach ($cart->get_cart() as $item) {172 $sku = $item['data']->get_meta( 'avify_sku', true );173 $update = false;174 $add = false;175 if (!isset($avifyLocalQuote[$sku])) {176 $add = true;177 avify_log("add item:{$sku}");178 } else {179 $avfLocalItem = explode(':', $avifyLocalQuote[$sku]);180 if (floatval($avfLocalItem[1]) != floatval($item['quantity'])) {181 $update = true;182 avify_log("update item {$avfLocalItem[0]}:{$sku}");183 }184 }185 186 if ($update || $add) {187 $url = $AVIFY_URL . "/rest/V1/guest-carts/{$avifyQuoteId}/items";188 $headers = [189 "Cookie: $avifyCookie",190 'Content-Type: application/json'191 ];192 $payload = json_encode([193 "cartItem" => [194 "sku" => $sku,195 "qty" => $item['quantity']196 ]197 ]);198 199 $avifyItem = null;200 if ($add) {201 $avifyItem = Curl::post(202 $url, $headers, $payload203 );204 } else {205 if (isset($avfLocalItem[0]) && $update) {206 $avifyItem = Curl::put(207 $url . "/{$avfLocalItem[0]}", $headers, $payload208 );209 }210 }211 if ($avifyItem) {212 avify_log($avifyItem);213 if ($avifyItem['success']) {214 $avifyLocalQuote[$sku] = $avifyItem['data']['item_id'] . ':' . $item['quantity'];215 } else {216 if(isset($avifyItem['httpCode'])) {217 if($avifyItem['httpCode'] == 404) {218 //Clear219 WC()->session->set('avify_quote_' . $wooCartKey, NULL);220 WC()->session->set('avify_shop_' . $wooCartKey, NULL);221 WC()->session->set('avify_local_quote_' . $wooCartKey, NULL);222 WC()->session->set('avify_cart_uuid', NULL);223 }224 }225 }226 }227 }228 }*/229 //Delete items230 /*foreach ($avifyLocalQuote as $avfSku => $avfLocalItem) {231 $found = false;232 foreach ($cart->get_cart() as $item) {233 $sku = $item['data']->get_meta( 'avify_sku', true );234 if ($sku == $avfSku) {235 $found = true;236 }237 }238 if (!$found) {239 $avfLocalItem = explode(':', $avfLocalItem);240 avify_log("delete item {$avfLocalItem[0]}:{$avfSku}");241 Curl::delete($AVIFY_URL . "/rest/V1/guest-carts/{$avifyQuoteId}/items/{$avfLocalItem[0]}",242 [243 "Cookie: $avifyCookie"244 ]245 );246 unset($avifyLocalQuote[$avfSku]);247 }248 }249 WC()->session->set('avify_local_quote_' . $wooCartKey, json_encode($avifyLocalQuote));*/250 251 /** Rates **/252 128 if (!isset($package['destination'])) { 253 129 WC()->session->set('avify_lock', false); … … 255 131 } 256 132 257 //Coords258 133 $latitude = isset($_POST['lpac_latitude']) ? sanitize_text_field($_POST['lpac_latitude']) : 0.00; 259 134 $longitude = isset($_POST['lpac_longitude']) ? sanitize_text_field($_POST['lpac_longitude']) : 0.00; … … 292 167 ]), $responseHeaders 293 168 ); 169 avify_log(json_encode($avifyRates)); 294 170 if (!isset($avifyRates['data'])) { 295 avify_log(' No rates found on avify...');171 avify_log('no rates found on avify.'); 296 172 avify_log($avifyRates); 297 173 WC()->session->set('avify_lock', false); … … 319 195 } 320 196 } 321 //shuffle($rates); 322 if(!$rates) { 323 WC()->session->set('avify_lock', false); 324 return; 325 } 197 326 198 foreach ($rates as $rate) { 327 199 $this->add_rate($rate); 328 200 } 201 329 202 WC()->session->set('avify_lock', false); 330 203 } else { 331 avify_log(WC()->session->get('avify_lock') ? 'locked. ..' : 'no-locked...');204 avify_log(WC()->session->get('avify_lock') ? 'locked.' : 'no-locked.'); 332 205 } 333 206 -
avify/trunk/readme.txt
r2819318 r2855509 3 3 Tags: avify, checkout, orders, payment gateway, woocommerce 4 4 Requires at least: 5.6 5 Tested up to: 5.9.26 Stable tag: 1.0. 45 Tested up to: 6.1.1 6 Stable tag: 1.0.6 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 31 31 * Processing of payments in USD or CRC. 32 32 * Sandbox testing. 33 * S incronize orders33 * Synchronize orders 34 34 35 35 Do you want to know more about Avify? Please visit our [website](https://avify.com/) and find out what we can do. … … 58 58 == Changelog == 59 59 60 ### 1.0.4 60 ### 1.0.6 61 62 * Upgrade tested up to. 63 64 = 1.0.5 = 65 66 * Fix package bug. 67 68 = 1.0.4 = 61 69 62 70 * Improve Avify rates collect.
Note: See TracChangeset
for help on using the changeset viewer.