Changeset 3130893
- Timestamp:
- 08/05/2024 08:43:06 AM (20 months ago)
- Location:
- seur/trunk
- Files:
-
- 11 edited
-
assets/js/seur-country-state.js (modified) (3 diffs)
-
classes/class-seur-global.php (modified) (1 diff)
-
classes/class-seur-seguimiento.php (modified) (2 diffs)
-
classes/tcpdf/include/tcpdf_fonts.php (modified) (6 diffs)
-
classes/tcpdf/include/tcpdf_static.php (modified) (2 diffs)
-
core/functions/functions.php (modified) (3 diffs)
-
core/labels-cpt/labels-cpt.php (modified) (2 diffs)
-
core/pages/rates/seur-country-state-process.php (modified) (2 diffs)
-
core/woocommerce/includes/seur-woo-functions.php (modified) (2 diffs)
-
loader.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seur/trunk/assets/js/seur-country-state.js
r1836328 r3130893 1 1 jQuery(document).ready(function($){ 2 var seur_country_state_process = 'admin .php?page=seur_country_state_process';2 var seur_country_state_process = 'admin-ajax.php?action=seur_country_state_process'; 3 3 4 $("select.rate").change(function(){ 4 $("#emp-SaveForm").on( "change", 'select.rate', seur_rate_change ); 5 $("#emp-SaveForm").on( "change", 'select.country', seur_country_change ); 6 $("#emp-UpdateForm").on( "change", 'select.rate', seur_rate_change ); 7 $("#emp-UpdateForm").on( "change", 'select.country', seur_country_change ); 8 9 function seur_rate_change() { 5 10 var selectedRate = $(".rate option:selected").val(); 6 11 $.ajax({ … … 11 16 $("#countryid").replaceWith( $("#countryid").html(data) ); 12 17 }); 13 } );18 } 14 19 15 $("select.country").change(function(){20 function seur_country_change() { 16 21 var selectedCountry = $(".country option:selected").val(); 17 22 $.ajax({ … … 22 27 $("#states").replaceWith( $("#states").html(data) ); 23 28 }); 24 } );29 } 25 30 }); -
seur/trunk/classes/class-seur-global.php
r3119152 r3130893 571 571 "currencyCode" => "EUR", 572 572 "amount" => $preparedData['valorReembolso'], 573 "codFee" => " D"573 "codFee" => "P" 574 574 ]; 575 575 } -
seur/trunk/classes/class-seur-seguimiento.php
r3119152 r3130893 39 39 $this->token = seur()->get_token_b(); 40 40 $this->reftype = 'REFERENCE'; 41 $this->id_number = seur()->get_option( 'seur_nif_field' );42 41 $this->full_account_number = seur()->get_option( 'seur_accountnumber_field' ); 43 42 $this->accoun_number = substr( $this->full_account_number, 0, strpos( $this->full_account_number, '-' ) ); … … 51 50 'ref' => $ref, 52 51 'refType' => $this->reftype, 53 'idNumber' => $this->id_number,54 52 'accountNumber' => $this->accoun_number, 55 53 'businessUnit' => $this->business_unit, -
seur/trunk/classes/tcpdf/include/tcpdf_fonts.php
r3120329 r3130893 1996 1996 * @public static 1997 1997 */ 1998 public static function UTF8StringToArray($str, $isunicode =true, &$currentfont) {1998 public static function UTF8StringToArray($str, $isunicode, &$currentfont) { 1999 1999 if ($isunicode) { 2000 2000 // requires PCRE unicode support turned on … … 2022 2022 * @public static 2023 2023 */ 2024 public static function UTF8ToLatin1($str, $isunicode =true, &$currentfont) {2024 public static function UTF8ToLatin1($str, $isunicode, &$currentfont) { 2025 2025 $unicode = self::UTF8StringToArray($str, $isunicode, $currentfont); // array containing UTF-8 unicode values 2026 2026 return self::UTF8ArrToLatin1($unicode); … … 2038 2038 * @public static 2039 2039 */ 2040 public static function UTF8ToUTF16BE($str, $setbom =false, $isunicode=true, &$currentfont) {2040 public static function UTF8ToUTF16BE($str, $setbom, $isunicode, &$currentfont) { 2041 2041 if (!$isunicode) { 2042 2042 return $str; // string is not in unicode … … 2058 2058 * @public static 2059 2059 */ 2060 public static function utf8StrRev($str, $setbom =false, $forcertl=false, $isunicode=true, &$currentfont) {2060 public static function utf8StrRev($str, $setbom, $forcertl, $isunicode, &$currentfont) { 2061 2061 return self::utf8StrArrRev(self::UTF8StringToArray($str, $isunicode, $currentfont), $str, $setbom, $forcertl, $isunicode, $currentfont); 2062 2062 } … … 2075 2075 * @public static 2076 2076 */ 2077 public static function utf8StrArrRev($arr, $str ='', $setbom=false, $forcertl=false, $isunicode=true, &$currentfont) {2077 public static function utf8StrArrRev($arr, $str, $setbom, $forcertl, $isunicode, &$currentfont) { 2078 2078 return self::arrUTF8ToUTF16BE(self::utf8Bidi($arr, $str, $forcertl, $isunicode, $currentfont), $setbom); 2079 2079 } … … 2091 2091 * @public static 2092 2092 */ 2093 public static function utf8Bidi($ta, $str ='', $forcertl=false, $isunicode=true, &$currentfont) {2093 public static function utf8Bidi($ta, $str, $forcertl, $isunicode, &$currentfont) { 2094 2094 // paragraph embedding level 2095 2095 $pel = 0; -
seur/trunk/classes/tcpdf/include/tcpdf_static.php
r3120329 r3130893 1137 1137 * @public static 1138 1138 */ 1139 public static function fixHTMLCode($html, $default_css ='', $tagvs='', $tidy_options='', &$tagvspaces) {1139 public static function fixHTMLCode($html, $default_css, $tagvs, $tidy_options, &$tagvspaces) { 1140 1140 // configure parameters for HTML Tidy 1141 1141 if ($tidy_options === '') { … … 2508 2508 * @public static 2509 2509 */ 2510 public static function setPageBoxes($page, $type, $llx, $lly, $urx, $ury, $points =false, $k, $pagedim=array()) {2510 public static function setPageBoxes($page, $type, $llx, $lly, $urx, $ury, $points, $k, $pagedim=array()) { 2511 2511 if (!isset($pagedim[$page])) { 2512 2512 // initialize array -
seur/trunk/core/functions/functions.php
r3121021 r3130893 1215 1215 $email = $order->get_billing_email(); 1216 1216 $phone = cleanPhone($order->get_billing_phone()); 1217 $order_total = $order->get_ meta('_order_total', true);1217 $order_total = $order->get_total(); 1218 1218 $order_pay_method = $order->get_payment_method(); 1219 1219 … … 1713 1713 } 1714 1714 1715 $preparedData['claveReembolso'] = '';1716 1715 $preparedData['valorReembolso'] = ''; 1717 1716 if ( 'cod' === $preparedData['order_pay_method']) { 1718 $preparedData['claveReembolso'] = 'f';1719 1717 $preparedData['valorReembolso'] = $preparedData['customer_order_total']; 1720 1718 } … … 1909 1907 } 1910 1908 1909 add_action('wp_ajax_seur_country_state_process', 'seur_country_state_process'); 1910 add_action('wp_ajax_nopriv_seur_country_state_process', 'seur_country_state_process'); 1911 1911 1912 remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 ); 1912 1913 add_action( 'shutdown', function() { -
seur/trunk/core/labels-cpt/labels-cpt.php
r3119152 r3130893 505 505 506 506 set_transient( get_current_user_id() . '_seur_label_bulk_manifest', true ); 507 $redirect_to = add_query_arg( 'bulk_manifest_seur', count( $labels_ids ), $redirect_to );508 return $redirect_to;509 507 510 508 } … … 551 549 $total_expedidiciones++; 552 550 $total_bultos = $total_bultos + $order['bultos']; 553 $total_kgs = $total_kgs + $order['peso'];551 $total_kgs = $total_kgs + round((float) $order['peso'], 2); 554 552 $total_reembolso = $total_reembolso + $order['cashondelivery']; 555 553 } -
seur/trunk/core/pages/rates/seur-country-state-process.php
r3119152 r3130893 26 26 } 27 27 echo '</select>'; 28 set_transient( get_current_user_id() . '_seur_rate', $rate );28 //set_transient( get_current_user_id() . '_seur_rate', $rate ); 29 29 } 30 30 if ( isset( $_POST['country'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing … … 59 59 unset( $country ); 60 60 } 61 die; 61 62 } -
seur/trunk/core/woocommerce/includes/seur-woo-functions.php
r3119152 r3130893 22 22 } 23 23 // Store cart weight in the database. 24 add_action( 'woocommerce_checkout_update_order_meta', 'seur_add_cart_weight' ); 25 function seur_add_cart_weight( $order_id ) { 26 global $woocommerce; 27 28 $order = new WC_Order( $order_id ); 29 30 $ship_methods = maybe_unserialize( $order->get_shipping_methods() ); 31 foreach ( $ship_methods as $ship_method ) { 32 $product_name = $ship_method['name']; 33 } 24 /********************************************* 25 * COMMENT THIS CODE WHILE WOOCOMMERCE RESOLVE THE BUG 26 * woocommerce_checkout_update_order_meta not hiring with new WC Checkout Block 27 ********************************************/ 28 /* add_action( 'woocommerce_checkout_update_order_meta', 'seur_add_cart_weight' ); 29 function seur_add_cart_weight( $order_id ) 30 { 31 $order = new WC_Order( $order_id ); 32 33 $ship_methods = maybe_unserialize( $order->get_shipping_methods() ); 34 foreach ( $ship_methods as $ship_method ) { 35 $product_name = $ship_method['name']; 36 } 34 37 35 38 $products = seur()->get_products(); … … 44 47 } 45 48 46 $weight = WC()->cart->cart_contents_weight;49 $weight = WC()->cart->cart_contents_weight; 47 50 $order->update_meta_data('_seur_cart_weight', $weight ); 51 $order->save_meta_data(); 52 } */ 53 /********************************************* 54 * ADDED THIS ACTION WHILE WOOCOMMERCE RESOLVE THE BUG 55 * woocommerce_checkout_update_order_meta not hiring with new WC Checkout Block 56 ********************************************/ 57 add_action( 'woocommerce_thankyou', 'seur_add_cart_weight_bis' ); 58 function seur_add_cart_weight_bis( $order_id ) 59 { 60 if (!is_numeric($order_id)) { 61 return; 62 } 63 64 $order = new WC_Order( $order_id ); 65 $ship_methods = maybe_unserialize( $order->get_shipping_methods() ); 66 foreach ( $ship_methods as $ship_method ) { 67 $product_name = $ship_method['name']; 68 } 69 70 $products = seur()->get_products(); 71 foreach ( $products as $code => $product ) { 72 $custom_name = get_option($product['field'].'_custom_name_field')?get_option($product['field'].'_custom_name_field'):$code; 73 if ($custom_name == $product_name) { 74 $order->update_meta_data('_seur_shipping', 'seur' ); 75 $order->update_meta_data('_seur_shipping_method_service_real_name', $code ); 76 $order->update_meta_data('_seur_shipping_method_service', sanitize_title( $product_name ) ); 77 break; 78 } 79 } 80 81 $items = $order->get_items(); 82 $total_weight = 0; 83 foreach ($items as $item) { 84 $product_quantity = $item->get_quantity(); 85 $product_weight = $item->get_product()->get_weight(); // Obtiene el peso del producto 86 $total_weight += $product_weight * $product_quantity; 87 } 88 89 $order->update_meta_data('_seur_cart_weight', $total_weight ); 48 90 $order->save_meta_data(); 49 91 } -
seur/trunk/loader.php
r3121021 r3130893 4 4 * Plugin URI: http://www.seur.com/ 5 5 * Description: Add SEUR shipping method to WooCommerce. The SEUR plugin for WooCommerce allows you to manage your order dispatches in a fast and easy way 6 * Version: 2.2.1 06 * Version: 2.2.11 7 7 * Author: SEUR Oficial 8 8 * Author URI: http://www.seur.com/ 9 * Tested up to: 6. 5.59 * Tested up to: 6.2 10 10 * WC requires at least: 3.0 11 * WC tested up to: 9.1.011 * WC tested up to: 7.4 12 12 * Text Domain: seur 13 13 * Domain Path: /languages/ … … 18 18 **/ 19 19 20 define( 'SEUR_OFFICIAL_VERSION', '2.2.1 0.2' );20 define( 'SEUR_OFFICIAL_VERSION', '2.2.11' ); 21 21 define( 'SEUR_DB_VERSION', '1.0.4' ); 22 22 define( 'SEUR_TABLE_VERSION', '1.0.4' ); -
seur/trunk/readme.txt
r3121021 r3130893 3 3 Tags: woocommerce, shipping, seur, logistica, enviar paquete, pedidos, entregas 4 4 Requires at least: 4.0 5 Tested up to: 6. 5.56 Stable tag: 2.2.1 0.25 Tested up to: 6.2 6 Stable tag: 2.2.11 7 7 WC requires at least: 3.0 8 WC tested up to: 9.1.08 WC tested up to: 7.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 93 93 94 94 == Changelog == 95 96 == 2.2.11 == 97 98 * CHANGED: Rates ajax call 99 * CHANGED: Remove optional parameters to avoid deprecated notice in tcpdf library 100 * CHANGED: Remove id_number (nif) from request data 101 * FIXED: Fix COD value 102 * FIXED: Manifest remove redirect 103 * FIXED: Woocommerce bug with metadata in checkout block 104 * FIXED: Woocommerce bug undefined wc_get_page_screen_id 95 105 96 106 == 2.2.10 ==
Note: See TracChangeset
for help on using the changeset viewer.