Changeset 2844692
- Timestamp:
- 01/06/2023 08:00:03 PM (3 years ago)
- Location:
- quick-license-manager/trunk
- Files:
-
- 3 edited
-
Readme.txt (modified) (2 diffs)
-
classes/qlm_api_view.php (modified) (3 diffs)
-
wc_qlm.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quick-license-manager/trunk/Readme.txt
r2800258 r2844692 3 3 Tags: quick license manager, software protection, ecommerce 4 4 Requires at least: 4.2 5 Tested up to: 6. 0.16 Stable tag: 2.4. 75 Tested up to: 6.1.1 6 Stable tag: 2.4.8 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 40 40 41 41 == Changelog == 42 43 = 2.4.8 - 01/06/2023 = 44 Added support for passing and setting the &is_userdata1 argument when placing an order. 45 42 46 43 47 = 2.4.7 - 10/17/2022 = -
quick-license-manager/trunk/classes/qlm_api_view.php
r2763155 r2844692 1 1 <?php 2 2 if ( !class_exists('QLM_Api_View')){ 3 class QLM_Api_View{ 3 class QLM_Api_View 4 { 5 6 public $userdata1 = ''; 4 7 5 function __construct(){ 6 8 function __construct() 9 { 10 $this->userdata1 = WC()->session->get( 'is_userdata1' ); 7 11 8 12 } … … 129 133 $is_maintduration = get_post_meta($pid,'is_maintduration',true); 130 134 $is_affiliateid = get_post_meta($pid,'is_affiliateid',true); 131 132 135 136 133 137 if(empty($is_expduration)) $is_expduration = $exduration; 134 138 if(empty($is_expdate)) $is_expdate = $exdate; … … 173 177 if(empty($qlm_activation_key) == false) 174 178 $url_args = $url_args.'&is_avkey='.$qlm_activation_key; 179 180 if(empty($this->userdata1) == false) 181 $url_args = $url_args.'&is_userdata1='.$this->userdata1; 175 182 176 183 if(empty($qlm_activation_key) == false) -
quick-license-manager/trunk/wc_qlm.php
r2800258 r2844692 5 5 * Plugin URI: https://wordpress.org/plugins/quick-license-manager/ 6 6 * Description: Automates the creation of license keys when orders are placed with WooCommerce 7 * Version: 2.4. 77 * Version: 2.4.8 8 8 * Author: Soraco Technologies Inc. 9 9 * Author URI: https://soraco.co 10 10 * WC requires at least: 4.0.0 11 * WC tested up to: 6.0.111 * WC tested up to: 7.2.2 12 12 */ 13 13 … … 189 189 add_action('woocommerce_order_status_processing',array(&$this, 'order_status_changed')); 190 190 add_action('woocommerce_order_status_completed',array(&$this, 'order_status_completed')); 191 191 192 add_action('woocommerce_add_to_cart',array(&$this, 'action_add_to_cart'), 10, 6); 192 193 add_action('add_meta_boxes', array(&$this,'add_meta') ); 193 194 … … 212 213 } 213 214 215 216 217 /** 218 * Function for `woocommerce_add_to_cart` action-hook. 219 * 220 * @param string $cart_id ID of the item in the cart. 221 * @param integer $product_id ID of the product added to the cart. 222 * @param integer $request_quantity Quantity of the item added to the cart. 223 * @param integer $variation_id Variation ID of the product added to the cart. 224 * @param array $variation Array of variation data. 225 * @param array $cart_item_data Array of other cart item data. 226 * 227 * @return void 228 */ 229 function action_add_to_cart($cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data) 230 { 231 $userdata1 = $_GET['is_userdata1']; 232 WC()->session->set('is_userdata1', $userdata1); 233 } 234 214 235 215 236 function so_payment_complete( $order_id ) … … 262 283 263 284 $qlm_v = new QLM_Api_View(); 264 285 265 286 debug_message(59, $order, __FUNCTION__, 'Cancelling order id:'.$order_id); 266 287 … … 295 316 296 317 $qlm_v = new QLM_Api_View(); 297 318 298 319 debug_message(65, $order, __FUNCTION__, 'Cancelling subscription id:'.$subscription->id); 299 320 … … 570 591 global $woocommerce; 571 592 572 573 574 593 //instantiate api calss 575 594 $qlm_v = new QLM_Api_View(); 576 595 577 596 $date_time = date('Y-m-d H:i:s'); 578 597 $orig_order_id=""; … … 582 601 583 602 debug_message(165, $order, __FUNCTION__, 'Processing order id:'.$order->id); 603 debug_message(166, $order, __FUNCTION__, 'UserData1 :'.$qlm_v->userdata1); 584 604 585 605 change_role_on_purchase( $order); … … 1115 1135 1116 1136 $qlm_v = new QLM_Api_View(); 1117 1137 1118 1138 $date_time = date('Y-m-d H:i:s'); 1119 1139 … … 1294 1314 1295 1315 $qlm_v = new QLM_Api_View(); 1296 1316 1297 1317 $qty = $item['qty']; 1298 1318 … … 1520 1540 1521 1541 $qlm_v = new QLM_Api_View(); 1522 1542 1523 1543 $date_time = date('Y-m-d H:i:s'); 1524 1544
Note: See TracChangeset
for help on using the changeset viewer.