Plugin Directory

Changeset 2849340


Ignore:
Timestamp:
01/16/2023 05:52:15 PM (3 years ago)
Author:
soraco
Message:

Fixed a regression issue in the last update that caused an exception when adding items to a cart without being logged in.

Location:
quick-license-manager/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quick-license-manager/trunk/Readme.txt

    r2845093 r2849340  
    44Requires at least: 4.2
    55Tested up to: 6.1.1
    6 Stable tag: 2.4.9
     6Stable tag: 2.4.10
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040
    4141== Changelog ==
     42
     43= 2.4.10 - 01/16/2023 =
     44Fixed a regression issue in the last update that caused an exception when adding items to a cart without being logged in.
    4245
    4346= 2.4.9 - 01/08/2023 =
  • quick-license-manager/trunk/wc_qlm.php

    r2845093 r2849340  
    55 * Plugin URI: https://wordpress.org/plugins/quick-license-manager/
    66 * Description: Automates the creation of license keys when orders are placed with WooCommerce
    7  * Version: 2.4.9
     7 * Version: 2.4.10
    88 * Author: Soraco Technologies Inc.
    99 * Author URI: https://soraco.co
     
    229229        function action_add_to_cart($cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data)
    230230        {
    231             $userdata1 = $_GET['is_userdata1'];         
    232             WC()->session->set('is_userdata1', $userdata1);     
     231            if (!is_null(WC()->session))
     232            {               
     233                if (isset ($_GET['is_userdata1']))
     234                {
     235                    $userdata1 = $_GET['is_userdata1'];
     236                    if (!is_null($userdata1))
     237                    {
     238                        WC()->session->set('is_userdata1', $userdata1);     
     239                    }
     240                }
     241            }
     242           
    233243        }
    234244   
Note: See TracChangeset for help on using the changeset viewer.