Plugin Directory

Changeset 3182334


Ignore:
Timestamp:
11/05/2024 01:18:34 PM (17 months ago)
Author:
laijis
Message:

version 1.0.11, Fixed currency issues

Location:
time-express/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • time-express/trunk/readme.txt

    r3182295 r3182334  
    55Tested up to: 6.6.2
    66Requires PHP: 7.0
    7 Stable tag: 1.0.10
     7Stable tag: 1.0.11
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • time-express/trunk/timexpress-delivery.php

    r3182295 r3182334  
    22/**
    33 * @package timexpress-delivery
    4  * @version 1.0.10
     4 * @version 1.0.11
    55 */
    66/*
     
    88Description: Plugin Enables Option To Add Time Express as shipping provider
    99Author: Time Express
    10 Version: 1.0.10
     10Version: 1.0.11
    1111* Requires at least: 5.4
    1212* Requires PHP: 7.0
  • time-express/trunk/utils/functions.php

    r2794840 r3182334  
    4646        $store_raw_country = get_option( 'woocommerce_default_country' );
    4747
    48         // Split the country/state
    49         $split_country = explode( ":", $store_raw_country );   
    50         // Country and state separated:
    51         $store_country = $split_country[0];
    52         $store_state   = $split_country[1];
     48        $split_country = explode( ":", $store_raw_country ); 
     49
     50if (isset($split_country[1])) {
     51    $store_country = $split_country[0];
     52    $store_state = $split_country[1];
     53} else {
     54    // Handle the case where the colon was not found or there's no state provided
     55    $store_country = $split_country[0];
     56    $store_state = '';  // Set a default or handle as needed
     57}       
    5358        $total_qty=0;
    5459        $good_description="";
     
    287292
    288293function TIMEX_currency_conversion($amount, $to="USD",$from="AED"){
     294    return $amount;
    289295        // print_r($amount);
    290296        // print_r($from);
    291297        // print_r($to);
    292         $from=strtoupper($from);
     298        /*$from=strtoupper($from);
    293299        $to=strtoupper($to);
    294300        $rates=TIMEX_getCurrencyRates();
    295301        $currency_rate_multiplier=((float)$rates[$to])/((float)$rates[$from]);
    296         //print_r($currency_rate_multiplier);
    297        
    298         return (float)(round($amount*$currency_rate_multiplier,2));
     302       
     303        return (float)(round($amount*$currency_rate_multiplier,2));*/
    299304}
    300305//export orders
Note: See TracChangeset for help on using the changeset viewer.