Changeset 1175236
- Timestamp:
- 06/05/2015 12:19:46 PM (11 years ago)
- Location:
- woocommerce-chilean-peso-currency/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
woocommerce-chilean-peso.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-chilean-peso-currency/trunk/readme.txt
r953689 r1175236 11 11 Tested up to: 3.6 12 12 13 Stable tag: 2.5 13 Stable tag: 2.5.5 14 14 15 15 == Description == … … 30 30 == Changelog == 31 31 32 = 2.5.5 = 33 34 Actualizado el 5 de Junio del 2015 35 36 * Se baja el tiempo del caché. 37 * Se actualiza el valor del dolar por defecto a 630. 38 32 39 = 2.5 = 33 40 -
woocommerce-chilean-peso-currency/trunk/woocommerce-chilean-peso.php
r953689 r1175236 5 5 Plugin URI: http://plugins.svn.wordpress.org/woocommerce-chilean-peso-currency/ 6 6 Description: This plugin enables the payment with paypal for Chile and the Chilean states to WooCommerce. 7 Version: 2.5 7 Version: 2.5.5 8 8 Author: Cristian Tala Sánchez <cristian.tala@gmail.com> 9 9 Author URI: http://www.cristiantala.cl 10 10 License: GPLv3 11 11 Requires at least: 3.0 + 12 Tested up to: 3.9.112 Tested up to: 4.2 13 13 */ 14 14 /* … … 30 30 * MA 02110-1301, USA. 31 31 */ 32 register_activation_hook(__FILE__, 'ctala_install_cleancache'); 33 34 /* 35 * Esta funcion limpia el cache luego de instalar la nueva versión del plugin. 36 */ 37 function ctala_install_cleancache() { 38 39 wp_cache_delete("clp_usd_ctala", "ctala"); 40 } 32 41 33 42 function add_clp_currency($currencies) { … … 79 88 80 89 function convert_clp_to_usd($paypal_args) { 90 //Grupo para el cache 91 $ctala_group = "ctala"; 92 //Segundos en una semana a cachear el valor. 93 $ctala_expire = 604800; 94 81 95 if ($paypal_args['currency_code'] == 'CLP') { 82 96 83 $valorDolar = wp_cache_get('clp_usd_ctala' );97 $valorDolar = wp_cache_get('clp_usd_ctala', $ctala_group); 84 98 if (false === $valorDolar) { 85 99 if (function_exists('curl_version')) { … … 99 113 $valorDolar = $exchangeRates->rates->CLP; 100 114 } else { 101 $valorDolar = 580; // Este es el valor por defecto.115 $valorDolar = 630; // Este es el valor por defecto. 102 116 } 103 wp_cache_set('clp_usd_ctala', $valorDolar );117 wp_cache_set('clp_usd_ctala', $valorDolar, $ctala_group, $ctala_expire); 104 118 } 105 119 … … 123 137 } 124 138 125 //Se eliminan los códigos po rtales como obligatorios. (Filtro)139 //Se eliminan los códigos postales como obligatorios. (Filtro) 126 140 add_filter('woocommerce_default_address_fields', 'postalcode_override_default_address_fields'); 127 141
Note: See TracChangeset
for help on using the changeset viewer.