Plugin Directory

Changeset 3417630


Ignore:
Timestamp:
12/11/2025 05:28:35 PM (3 months ago)
Author:
rermis
Message:

v1.0.5 = * Only display unexpired coupons in admin dropdown

Location:
view-carts/tags/1.0.5
Files:
3 copied

Legend:

Unmodified
Added
Removed
  • view-carts/tags/1.0.5/readme.txt

    r3405472 r3417630  
    55License URI: http://www.gnu.org/licenses/gpl-3.0.html
    66Requires at least: 6.6
    7 Tested up to: 6.8
    8 Stable tag: 1.0.3
     7Tested up to: 6.9
     8Stable tag: 1.0.5
    99
    1010A simple, fast, lightweight admin tool to share or recreate recent WooCommerce carts. Label carts, adjust pricing, and manage coupons.
     
    3737
    3838== Changelog ==
     39= 1.0.5 = * Only display unexpired coupons in admin dropdown
    3940= 1.0.3 = * Public release
    4041= 1.0.2 = * Updates for Review ID: R view-carts/rermis/14Nov25/T2 20Nov25/3.6.1
  • view-carts/tags/1.0.5/vc_functions.php

    r3405472 r3417630  
    99Author URI: https://richardlerma.com/contact/
    1010Requires Plugins: woocommerce
    11 Version: 1.0.3
     11Version: 1.0.5
    1212Text Domain: view-carts
    1313Copyright: (c) 2019-2025 rldd.net - All Rights Reserved
     
    1515License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1616WC requires at least: 9.0
    17 WC tested up to: 10.2
     17WC tested up to: 10.3
    1818*/
    1919
     
    124124  <h1 style='margin:1em 0'>Recent Carts</h1>";
    125125  if(!$q){echo "<p>No recent carts.</p></div>";return;}
    126   $coupons=[];$posts=get_posts(['post_type'=>'shop_coupon','post_status'=>'publish','numberposts'=>1000,'orderby'=>'title','order'=>'ASC']);foreach($posts as$p)$coupons[]=$p->post_title;if($coupons)echo"<div id='wcvsc-cdata' data-coupons='".esc_attr(implode(',',$coupons))."'></div>";
     126  $coupons=[];
     127  $posts=get_posts(['post_type'=>'shop_coupon','post_status'=>'publish','numberposts'=>1000,'orderby'=>'title','order'=>'ASC']);
     128  if($posts)foreach($posts as$p){
     129    $exp=get_post_meta($p->ID,'date_expires',true);if($exp===''){ $d=get_post_meta($p->ID,'expiry_date',true);$exp=$d?strtotime($d):'';}
     130    if($exp===''||$exp===false||$exp==0||$exp>=time())$coupons[]=$p->post_title;
     131  }
     132  if($coupons)echo"<div id='wcvsc-cdata' data-coupons='".esc_attr(implode(',',$coupons))."'></div>";
     133
    127134
    128135  echo "<table class='widefat striped'><thead><tr><th>Date</th><th>Identifiers</th><th>Items</th><th style='text-align:center'>Action</th></tr></thead><tbody>";
Note: See TracChangeset for help on using the changeset viewer.