Plugin Directory

Changeset 2800258


Ignore:
Timestamp:
10/17/2022 10:40:13 PM (3 years ago)
Author:
soraco
Message:

Tested compatibility with WooCommerce 7.0.0
Fixed an issue that caused an incompatibiliy with the WooCommerce Invoice plugin.

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

Legend:

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

    r2763155 r2800258  
    44Requires at least: 4.2
    55Tested up to: 6.0.1
    6 Stable tag: 2.4.6
     6Stable tag: 2.4.7
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040
    4141== Changelog ==
     42
     43= 2.4.7 - 10/17/2022 =
     44Tested compatibility with WooCommerce 7.0.0
     45Fixed an issue that caused an incompatibiliy with the WooCommerce Invoice plugin.
    4246
    4347= 2.4.6 - 07/28/2022 =
  • quick-license-manager/trunk/wc_qlm.php

    r2763155 r2800258  
    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.6
     7 * Version: 2.4.7
    88 * Author: Soraco Technologies Inc.
    99 * Author URI: https://soraco.co
     
    6161        $fieldValue= '';
    6262
    63         foreach ($meta_data as $v)
    64         {
    65             if($v['name']== $field)
    66             {
    67                 $fieldValue = $v['value'];
    68                 debug_message (5, $order, $field.': '.$fieldValue);
    69                 return $fieldValue;
    70             }
    71         }     
     63        if (is_array($meta_data) || is_object($meta_data))
     64        {
     65            foreach ($meta_data as $v)
     66            {
     67                if($v['name']== $field)
     68                {
     69                    $fieldValue = $v['value'];
     70                    debug_message (5, $order, $field.': '.$fieldValue);
     71                    return $fieldValue;
     72                }
     73            }     
     74        }
    7275    }   
    7376
     
    8992
    9093    $meta_data = $item->get_meta(WCPA_ORDER_META_KEY);
     94
     95    if (is_null($meta_data))
     96    {
     97        debug_message (12, $order, __FUNCTION__ , ':metadata is null .');
     98        return "";
     99    }
     100
     101
     102
    91103    // $meta_data this $meta_data will have all the user submited data.
    92104    // You can iterate through this and get the required value     
    93105    $fieldValue= '';
    94106
    95     foreach ($meta_data as $v)
     107    if (is_array($meta_data) || is_object($meta_data))
    96108    {
    97         if($v['name']== $field)
    98         {
    99             $fieldValue = $v['value'];
    100             debug_message (10, $order, __FUNCTION__ , $field.': '.$fieldValue);
    101             return $fieldValue;
    102         }
    103         else
    104         {
    105             debug_message (11, $order, __FUNCTION__ , $v['name'].': '.$v['value']);
    106         }
    107     }     
     109        foreach ($meta_data as $v)
     110        {
     111            if($v['name']== $field)
     112            {
     113                $fieldValue = $v['value'];
     114                debug_message (10, $order, __FUNCTION__ , $field.': '.$fieldValue);
     115                return $fieldValue;
     116            }
     117            else
     118            {
     119                debug_message (11, $order, __FUNCTION__ , $v['name'].': '.$v['value']);
     120            }
     121        }     
     122    }
    108123   
    109124
     
    561576
    562577            $date_time = date('Y-m-d H:i:s');
     578            $orig_order_id="";
    563579
    564580            //create order object
     
    608624                        $orig_subscription = $subscription;
    609625                   
    610                         debug_message(195, $order,  __FUNCTION__, 'parent order id:'.$orig_order_id);
     626                        if (is_null($orig_order_id))
     627                        {
     628                            debug_message(194, $order,  __FUNCTION__, 'parent order id: Null');
     629                        }
     630                        else
     631                        {
     632                            debug_message(195, $order,  __FUNCTION__, 'parent order id:'.$orig_order_id);
     633                        }
    611634
    612635                        // we only support one subscription
     
    972995            $qty = $item['qty'];
    973996            $qlm_activation_key = get_item_addon_value($order, $item, 'qlm_activation_key');           
     997            $yearly = 0;
    974998            debug_message(418, $order,  __FUNCTION__, 'Activation Key: '.$qlm_activation_key);
    975 
     999           
    9761000            debug_message(419, $order,  __FUNCTION__, 'Processing simple  item:'.$item);
    9771001
Note: See TracChangeset for help on using the changeset viewer.