Changeset 3469845
- Timestamp:
- 02/26/2026 04:28:20 AM (10 days ago)
- Location:
- view-carts/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
vc_functions.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
view-carts/trunk/readme.txt
r3461083 r3469845 6 6 Requires at least: 6.6 7 7 Tested up to: 6.9 8 Stable tag: 1.0. 68 Stable tag: 1.0.7 9 9 10 10 A simple, fast, lightweight admin tool to share or recreate recent WooCommerce carts. Label carts, adjust pricing, and manage coupons. … … 37 37 38 38 == Changelog == 39 = 1.0.7 = * Fix assign orderid on checkout 39 40 = 1.0.6 = * Fix cart save when variation selected 40 41 = 1.0.5 = * Only display unexpired coupons in admin dropdown -
view-carts/trunk/vc_functions.php
r3461083 r3469845 9 9 Author URI: https://richardlerma.com/contact/ 10 10 Requires Plugins: woocommerce 11 Version: 1.0. 611 Version: 1.0.7 12 12 Text Domain: view-carts 13 13 Copyright: (c) 2019-2025 rldd.net - All Rights Reserved … … 15 15 License URI: http://www.gnu.org/licenses/gpl-3.0.html 16 16 WC requires at least: 9.0 17 WC tested up to: 10. 317 WC tested up to: 10.5 18 18 */ 19 19 … … 75 75 function wcvsc_save_cart(){ 76 76 if(is_admin()||wp_doing_cron()||!function_exists('WC')||!WC()->cart)return; 77 if(defined('REST_REQUEST')&&REST_REQUEST)return; 78 if(function_exists('wp_is_json_request')&&wp_is_json_request())return; 77 $uri=$_SERVER['REQUEST_URI']??''; 78 if((defined('REST_REQUEST')&&REST_REQUEST)&&($uri&&(stripos($uri,'/wp-json/wc/store/')!==false||stripos($uri,'/wc/store/')!==false)))return; 79 if(!empty($_GET['rest_route'])&&stripos((string)$_GET['rest_route'],'/wc/store/')!==false)return; 79 80 if(empty($_COOKIE['wcvsc_active'])||$_COOKIE['wcvsc_active']!=='1')return; 80 81 if(WC()->session&&!WC()->session->has_session())WC()->session->set_customer_session_cookie(true); 81 82 $c=WC()->cart->get_cart();if(!$c)return; 82 83 $ip=wcvsc_ip(); 83 $k=wcvsc_cart_key(); 84 $k=''; 85 if(function_exists('WC')&&WC()->session&&method_exists(WC()->session,'get')){ 86 $k=WC()->session->get('wcvsc_key'); 87 if(!$k)$k=wcvsc_cart_key(); 88 WC()->session->set('wcvsc_key',$k); 89 }else $k=wcvsc_cart_key(); 84 90 if(get_transient("wcvsc_update_$k"))return; 85 91 $wcvsc_cart=wcvsc_get_cart($k); … … 365 371 function wcvsc_order_thankyou($order_id){ 366 372 if(!$order_id)return; 367 $k=wcvsc_cart_key(); 373 $k=''; 374 if(function_exists('WC')&&WC()->session&&method_exists(WC()->session,'get'))$k=WC()->session->get('wcvsc_key'); 375 if(!$k)$k=wcvsc_cart_key(); 368 376 $t=wcvsc_get_cart($k);if(!$t)return; 369 377 $t['order_id']=(int)$order_id; … … 380 388 } 381 389 wcvsc_set_cart($k,$t); 390 set_transient('wcvsc_refresh','1'); 382 391 } 383 392 add_action('woocommerce_thankyou','wcvsc_order_thankyou',10,1);
Note: See TracChangeset
for help on using the changeset viewer.