Changeset 3040317
- Timestamp:
- 02/23/2024 03:57:13 PM (2 years ago)
- Location:
- cryptapi-payment-gateway-for-woocommerce
- Files:
-
- 9 edited
- 17 copied
-
tags/4.7.11 (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk)
-
tags/4.7.11/CryptAPI.php (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/CryptAPI.php) (1 diff)
-
tags/4.7.11/README.md (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/README.md) (1 diff)
-
tags/4.7.11/controllers/CryptAPI.php (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/controllers/CryptAPI.php) (11 diffs)
-
tags/4.7.11/define.php (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/define.php) (1 diff)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce-es_ES.mo (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce-es_ES.mo)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce-es_ES.po (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce-es_ES.po)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce-it_IT.mo (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce-it_IT.mo)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce-it_IT.po (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce-it_IT.po)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce-pt_BR.mo (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce-pt_BR.mo)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce-pt_BR.po (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce-pt_BR.po)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce-pt_PT.mo (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce-pt_PT.mo)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce-pt_PT.po (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce-pt_PT.po)
-
tags/4.7.11/languages/cryptapi-payment-gateway-for-woocommerce.pot (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/languages/cryptapi-payment-gateway-for-woocommerce.pot)
-
tags/4.7.11/readme.txt (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/readme.txt) (2 diffs)
-
tags/4.7.11/static/payment.js (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/static/payment.js)
-
tags/4.7.11/utils/helper.php (copied) (copied from cryptapi-payment-gateway-for-woocommerce/trunk/utils/helper.php)
-
trunk/CryptAPI.php (modified) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/controllers/CryptAPI.php (modified) (11 diffs)
-
trunk/define.php (modified) (1 diff)
-
trunk/languages/cryptapi-payment-gateway-for-woocommerce-es_ES.mo (modified) (previous)
-
trunk/languages/cryptapi-payment-gateway-for-woocommerce-it_IT.mo (modified) (previous)
-
trunk/languages/cryptapi-payment-gateway-for-woocommerce-pt_BR.mo (modified) (previous)
-
trunk/languages/cryptapi-payment-gateway-for-woocommerce-pt_PT.mo (modified) (previous)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cryptapi-payment-gateway-for-woocommerce/tags/4.7.11/CryptAPI.php
r2959171 r3040317 4 4 Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi 5 5 Description: Accept cryptocurrency payments on your WooCommerce website 6 Version: 4.7.1 06 Version: 4.7.11 7 7 Requires at least: 5 8 Tested up to: 6. 38 Tested up to: 6.4.3 9 9 WC requires at least: 5.8 10 WC tested up to: 8. 0.210 WC tested up to: 8.6.1 11 11 Requires PHP: 7.2 12 12 Author: cryptapi -
cryptapi-payment-gateway-for-woocommerce/tags/4.7.11/README.md
r2959171 r3040317 359 359 * Add new choices for order cancellation. 360 360 361 #### 4.7.11 362 * Minor fixes and improvements 363 361 364 ### Upgrade Notice 362 365 #### 4.3 -
cryptapi-payment-gateway-for-woocommerce/tags/4.7.11/controllers/CryptAPI.php
r2959171 r3040317 7 7 { 8 8 private static $HAS_TRIGGERED = false; 9 private static $COIN_OPTIONS = [];10 9 11 10 function __construct() … … 29 28 'multiple_subscriptions', 30 29 ); 31 32 $this->load_coins();33 34 30 $this->init_form_fields(); 35 31 $this->init_settings(); … … 66 62 function load_coins() 67 63 { 68 if (!empty(WC_CryptAPI_Gateway::$COIN_OPTIONS)) {69 return;70 }71 72 64 $transient = get_transient('cryptapi_coins'); 73 65 if (!empty($transient)) { 74 WC_CryptAPI_Gateway::$COIN_OPTIONS = $transient; 75 76 return; 66 return $transient; 77 67 } 78 68 79 69 $coins = CryptAPI\Helper::get_supported_coins(); 80 70 set_transient('cryptapi_coins', $coins, 86400); 81 WC_CryptAPI_Gateway::$COIN_OPTIONS =$coins;71 return $coins; 82 72 } 83 73 … … 180 170 private function ca_settings() 181 171 { 172 $load_coins = $this->load_coins(); 173 182 174 $this->enabled = $this->get_option('enabled'); 183 175 $this->title = $this->get_option('title'); … … 199 191 $this->icon = ''; 200 192 201 if (!empty( WC_CryptAPI_Gateway::$COIN_OPTIONS)) {202 foreach (array_keys( WC_CryptAPI_Gateway::$COIN_OPTIONS) as $coin) {193 if (!empty($load_coins)) { 194 foreach (array_keys($load_coins) as $coin) { 203 195 $this->{$coin . '_address'} = $this->get_option($coin . '_address'); 204 196 } … … 208 200 function init_form_fields() 209 201 { 210 211 if (!empty(WC_CryptAPI_Gateway::$COIN_OPTIONS)) { 202 $load_coins = $this->load_coins(); 203 204 if (!empty($load_coins)) { 212 205 $this->form_fields = array( 213 206 'enabled' => array( … … 376 369 377 370 $c = 0; 378 foreach ( WC_CryptAPI_Gateway::$COIN_OPTIONSas $ticker => $coin) {371 foreach ($load_coins as $ticker => $coin) { 379 372 $this->form_fields["{$ticker}_address"] = array( 380 373 'title' => is_array($coin) ? $coin['name'] : $coin, … … 416 409 417 410 function payment_fields() 418 { ?> 411 { 412 $load_coins = $this->load_coins(); 413 ?> 419 414 <div class="form-row form-row-wide"> 420 415 <p><?php echo esc_attr($this->description); ?></p> … … 433 428 $apikey = $this->api_key; 434 429 if (!empty($addr) || !empty($apikey)) { ?> 435 <option data-image="<?php echo esc_url( WC_CryptAPI_Gateway::$COIN_OPTIONS[$val]['logo']); ?>"430 <option data-image="<?php echo esc_url($load_coins[$val]['logo']); ?>" 436 431 value="<?php echo esc_attr($val); ?>" <?php 437 432 if (!empty($selected) && $selected === $val) { 438 433 echo esc_attr("selected='true'"); 439 434 } 440 $crypto_name = is_array( WC_CryptAPI_Gateway::$COIN_OPTIONS[$val]) ? WC_CryptAPI_Gateway::$COIN_OPTIONS[$val]['name'] : WC_CryptAPI_Gateway::$COIN_OPTIONS[$val];435 $crypto_name = is_array($load_coins[$val]) ? $load_coins[$val]['name'] : $load_coins[$val]; 441 436 ?>> <?php echo esc_attr(__('Pay with', 'cryptapi') . ' ' . $crypto_name); ?></option> 442 437 <?php … … 479 474 function validate_fields() 480 475 { 481 return array_key_exists(sanitize_text_field($_POST['cryptapi_coin']), WC_CryptAPI_Gateway::$COIN_OPTIONS); 476 $load_coins = $this->load_coins(); 477 return array_key_exists(sanitize_text_field($_POST['cryptapi_coin']), $load_coins); 482 478 } 483 479 … … 579 575 $order->save_meta_data(); 580 576 581 $order->update_status('on-hold', __('Awaiting payment', 'cryptapi') . ': ' . WC_CryptAPI_Gateway::$COIN_OPTIONS[$selected]); 577 $load_coins = $this->load_coins(); 578 579 $order->update_status('on-hold', __('Awaiting payment', 'cryptapi') . ': ' . $load_coins[$selected]); 582 580 $woocommerce->cart->empty_cart(); 583 581 -
cryptapi-payment-gateway-for-woocommerce/tags/4.7.11/define.php
r2959171 r3040317 1 1 <?php 2 2 3 define('CRYPTAPI_PLUGIN_VERSION', '4.7.1 0');3 define('CRYPTAPI_PLUGIN_VERSION', '4.7.11'); 4 4 define('CRYPTAPI_PLUGIN_PATH', plugin_dir_path(__FILE__)); 5 5 define('CRYPTAPI_PLUGIN_URL', plugin_dir_url(__FILE__)); -
cryptapi-payment-gateway-for-woocommerce/tags/4.7.11/readme.txt
r2959171 r3040317 3 3 Tags: crypto payments, woocommerce, payment gateway, crypto, payment, pay with crypto, payment request, bitcoin, bnb, usdt, ethereum, litecoin, bitcoin cash, shib, doge 4 4 Requires at least: 5 5 Tested up to: 6. 36 Stable tag: 4.7.1 05 Tested up to: 6.4.3 6 Stable tag: 4.7.11 7 7 Requires PHP: 7.2 8 8 WC requires at least: 5.8 9 WC tested up to: 8. 0.29 WC tested up to: 8.6.1 10 10 License: MIT 11 11 … … 357 357 * Add new choices for order cancellation. 358 358 359 = 4.7.11 = 360 * Minor fixes and improvements 359 361 360 362 == Upgrade Notice == -
cryptapi-payment-gateway-for-woocommerce/trunk/CryptAPI.php
r2959171 r3040317 4 4 Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi 5 5 Description: Accept cryptocurrency payments on your WooCommerce website 6 Version: 4.7.1 06 Version: 4.7.11 7 7 Requires at least: 5 8 Tested up to: 6. 38 Tested up to: 6.4.3 9 9 WC requires at least: 5.8 10 WC tested up to: 8. 0.210 WC tested up to: 8.6.1 11 11 Requires PHP: 7.2 12 12 Author: cryptapi -
cryptapi-payment-gateway-for-woocommerce/trunk/README.md
r2959171 r3040317 359 359 * Add new choices for order cancellation. 360 360 361 #### 4.7.11 362 * Minor fixes and improvements 363 361 364 ### Upgrade Notice 362 365 #### 4.3 -
cryptapi-payment-gateway-for-woocommerce/trunk/controllers/CryptAPI.php
r2959171 r3040317 7 7 { 8 8 private static $HAS_TRIGGERED = false; 9 private static $COIN_OPTIONS = [];10 9 11 10 function __construct() … … 29 28 'multiple_subscriptions', 30 29 ); 31 32 $this->load_coins();33 34 30 $this->init_form_fields(); 35 31 $this->init_settings(); … … 66 62 function load_coins() 67 63 { 68 if (!empty(WC_CryptAPI_Gateway::$COIN_OPTIONS)) {69 return;70 }71 72 64 $transient = get_transient('cryptapi_coins'); 73 65 if (!empty($transient)) { 74 WC_CryptAPI_Gateway::$COIN_OPTIONS = $transient; 75 76 return; 66 return $transient; 77 67 } 78 68 79 69 $coins = CryptAPI\Helper::get_supported_coins(); 80 70 set_transient('cryptapi_coins', $coins, 86400); 81 WC_CryptAPI_Gateway::$COIN_OPTIONS =$coins;71 return $coins; 82 72 } 83 73 … … 180 170 private function ca_settings() 181 171 { 172 $load_coins = $this->load_coins(); 173 182 174 $this->enabled = $this->get_option('enabled'); 183 175 $this->title = $this->get_option('title'); … … 199 191 $this->icon = ''; 200 192 201 if (!empty( WC_CryptAPI_Gateway::$COIN_OPTIONS)) {202 foreach (array_keys( WC_CryptAPI_Gateway::$COIN_OPTIONS) as $coin) {193 if (!empty($load_coins)) { 194 foreach (array_keys($load_coins) as $coin) { 203 195 $this->{$coin . '_address'} = $this->get_option($coin . '_address'); 204 196 } … … 208 200 function init_form_fields() 209 201 { 210 211 if (!empty(WC_CryptAPI_Gateway::$COIN_OPTIONS)) { 202 $load_coins = $this->load_coins(); 203 204 if (!empty($load_coins)) { 212 205 $this->form_fields = array( 213 206 'enabled' => array( … … 376 369 377 370 $c = 0; 378 foreach ( WC_CryptAPI_Gateway::$COIN_OPTIONSas $ticker => $coin) {371 foreach ($load_coins as $ticker => $coin) { 379 372 $this->form_fields["{$ticker}_address"] = array( 380 373 'title' => is_array($coin) ? $coin['name'] : $coin, … … 416 409 417 410 function payment_fields() 418 { ?> 411 { 412 $load_coins = $this->load_coins(); 413 ?> 419 414 <div class="form-row form-row-wide"> 420 415 <p><?php echo esc_attr($this->description); ?></p> … … 433 428 $apikey = $this->api_key; 434 429 if (!empty($addr) || !empty($apikey)) { ?> 435 <option data-image="<?php echo esc_url( WC_CryptAPI_Gateway::$COIN_OPTIONS[$val]['logo']); ?>"430 <option data-image="<?php echo esc_url($load_coins[$val]['logo']); ?>" 436 431 value="<?php echo esc_attr($val); ?>" <?php 437 432 if (!empty($selected) && $selected === $val) { 438 433 echo esc_attr("selected='true'"); 439 434 } 440 $crypto_name = is_array( WC_CryptAPI_Gateway::$COIN_OPTIONS[$val]) ? WC_CryptAPI_Gateway::$COIN_OPTIONS[$val]['name'] : WC_CryptAPI_Gateway::$COIN_OPTIONS[$val];435 $crypto_name = is_array($load_coins[$val]) ? $load_coins[$val]['name'] : $load_coins[$val]; 441 436 ?>> <?php echo esc_attr(__('Pay with', 'cryptapi') . ' ' . $crypto_name); ?></option> 442 437 <?php … … 479 474 function validate_fields() 480 475 { 481 return array_key_exists(sanitize_text_field($_POST['cryptapi_coin']), WC_CryptAPI_Gateway::$COIN_OPTIONS); 476 $load_coins = $this->load_coins(); 477 return array_key_exists(sanitize_text_field($_POST['cryptapi_coin']), $load_coins); 482 478 } 483 479 … … 579 575 $order->save_meta_data(); 580 576 581 $order->update_status('on-hold', __('Awaiting payment', 'cryptapi') . ': ' . WC_CryptAPI_Gateway::$COIN_OPTIONS[$selected]); 577 $load_coins = $this->load_coins(); 578 579 $order->update_status('on-hold', __('Awaiting payment', 'cryptapi') . ': ' . $load_coins[$selected]); 582 580 $woocommerce->cart->empty_cart(); 583 581 -
cryptapi-payment-gateway-for-woocommerce/trunk/define.php
r2959171 r3040317 1 1 <?php 2 2 3 define('CRYPTAPI_PLUGIN_VERSION', '4.7.1 0');3 define('CRYPTAPI_PLUGIN_VERSION', '4.7.11'); 4 4 define('CRYPTAPI_PLUGIN_PATH', plugin_dir_path(__FILE__)); 5 5 define('CRYPTAPI_PLUGIN_URL', plugin_dir_url(__FILE__)); -
cryptapi-payment-gateway-for-woocommerce/trunk/readme.txt
r2959171 r3040317 3 3 Tags: crypto payments, woocommerce, payment gateway, crypto, payment, pay with crypto, payment request, bitcoin, bnb, usdt, ethereum, litecoin, bitcoin cash, shib, doge 4 4 Requires at least: 5 5 Tested up to: 6. 36 Stable tag: 4.7.1 05 Tested up to: 6.4.3 6 Stable tag: 4.7.11 7 7 Requires PHP: 7.2 8 8 WC requires at least: 5.8 9 WC tested up to: 8. 0.29 WC tested up to: 8.6.1 10 10 License: MIT 11 11 … … 357 357 * Add new choices for order cancellation. 358 358 359 = 4.7.11 = 360 * Minor fixes and improvements 359 361 360 362 == Upgrade Notice ==
Note: See TracChangeset
for help on using the changeset viewer.