Plugin Directory

Changeset 3367195


Ignore:
Timestamp:
09/24/2025 12:30:36 PM (6 months ago)
Author:
cocolis
Message:

Release 1.1.3
Fix a php issue when session is not initialized

Location:
cocolis
Files:
126 added
3 edited

Legend:

Unmodified
Added
Removed
  • cocolis/trunk/class/wc-cocolis-payment.php

    r2988119 r3367195  
    2323
    2424    /**
    25      * Legal terms for MAIF insurance
     25     * Legal terms for insurance
    2626     */
    2727    function cocolis_show_terms_insurance($fields)
     
    4343        }
    4444
    45         $chosen_methods = WC()->session->get('chosen_shipping_methods');
    46         $chosen_shipping = $chosen_methods[0];
     45        if (WC()->session && WC()->session->has_session()) {
     46            $chosen_methods = WC()->session->get('chosen_shipping_methods');
     47            $chosen_shipping = $chosen_methods[0];
     48        } else {
     49            $chosen_shipping = null;
     50        }
    4751
    4852        $link_insurance = "https://www.cocolis.fr/static/docs/notice_information_COCOLIS_AO.pdf";
     
    111115            $order_data = $order->get_data();
    112116            if ($order->has_shipping_method('cocolis') && empty($order->get_meta('_cocolis_ride_id'))) {
    113                
     117
    114118                // The main address pieces:
    115119                $store_name        = apply_filters('cocolis_store_name', get_bloginfo('name'), null);
     
    189193                    // The country/state
    190194                    $store_raw_country = apply_filters('cocolis_store_country', get_option('woocommerce_default_country'), $product_id);
    191                    
     195
    192196                    $data = wc_get_product( $product_id );
    193197                    $width = (int) $data->get_width();
  • cocolis/trunk/readme.txt

    r3318611 r3367195  
    22Contributors: cocolis
    33Tags: woocommerce, delivery, cocolis, livraison
    4 Stable tag: 1.1.2
     4Stable tag: 1.1.3
    55Requires at least: 4.7
    66Tested up to: 6.8
     
    4949
    5050== Changelog ==
     51= 1.1.3 =
     52* Fix a php issue when session is not enabled
     53
    5154= 1.1.2 =
    5255* Change description
  • cocolis/trunk/wc-cocolis-shipping.php

    r3318610 r3367195  
    77 * Author:  Cocolis.fr
    88 * Author URI: https://www.cocolis.fr
    9  * Version: 1.1.2
     9 * Version: 1.1.3
    1010 * Developer: Alexandre BETTAN, Sebastien FIELOUX
    1111 * Developer URI: https://github.com/btnalexandre, https://github.com/sebfie
Note: See TracChangeset for help on using the changeset viewer.