Plugin Directory

Changeset 3318616


Ignore:
Timestamp:
06/27/2025 07:33:42 AM (7 months ago)
Author:
DarkoG
Message:

Version 1.8.2

Location:
digital-license-manager/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • digital-license-manager/trunk/digital-license-manager.php

    r3315067 r3318616  
    44 * Plugin URI: https://codeverve.com/product/digital-license-manager-pro/
    55 * Description: Easily manage and sell your license keys on your website. Compatible with WooCommerce for selling licenses but also works without it.
    6  * Version: 1.8.1
     6 * Version: 1.8.2
    77 * Author: CodeVerve
    88 * Author URI: https://codeverve.com/
     
    4444
    4545if ( ! defined( 'DLM_PLUGIN_VERSION' ) ) {
    46     define( 'DLM_PLUGIN_VERSION', '1.8.1' );
     46    define( 'DLM_PLUGIN_VERSION', '1.8.2' );
    4747}
    4848if ( ! defined( 'DLM_PURCHASE_URL' ) ) {
  • digital-license-manager/trunk/includes/Enums/LicensePublicStatus.php

    r3311947 r3318616  
    9494        $wrapper = isset( $args['inline'] ) && $args['inline'] ? 'inline' : 'full';
    9595
    96         if ( in_array( $license->getStatus(), [ LicensePrivateStatus::SOLD, LicensePrivateStatus::DELIVERED ] ) ) {
     96        if ( in_array( $license->getStatus(), [ LicensePrivateStatus::SOLD, LicensePrivateStatus::DELIVERED, LicensePrivateStatus::ACTIVE ] ) ) {
    9797            if ( $license->isExpired() ) {
    9898                $status = self::EXPIRED;
  • digital-license-manager/trunk/includes/ListTables/Activations.php

    r3311947 r3318616  
    105105    private function getRecordsCount( $status = '' ) {
    106106        $query = $this->getRecordsQuery( $status );
    107 
    108107        return LicenseActivations::instance()->count( $query['where'] );
    109108    }
     
    119118
    120119        // Applies the view filter
    121         if ( ! empty( $status ) || $this->isViewFilterActive() ) {
    122 
    123             $status = empty( $status ) && ! empty( $_GET['status'] ) ? sanitize_text_field( wp_unslash( $_GET['status'] ) ) : '';
    124 
    125             if ( 'inactive' === $status ) {
     120        if ( empty( $status ) && $this->isViewFilterActive() ) {
     121            $status = isset( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : '';
     122        }
     123
     124        switch($status) {
     125            case 'enabled':
     126                $where['deactivated_at'] = [
     127                    'operator' => "IS",
     128                    'value'    => "NULL",
     129                ];
     130                break;
     131            case 'disabled':
    126132                $where['deactivated_at'] = [
    127133                    'operator' => "IS",
    128134                    'value'    => "NOT NULL",
    129135                ];
    130             } else {
    131                 $where['deactivated_at'] = [
    132                     'operator' => "IS",
    133                     'value'    => "NULL",
    134                 ];
    135             }
    136136        }
    137137
     
    316316            $html = sprintf(
    317317                '<div class="dlm-status dlm-status-inactive"><span class="dashicons dashicons-marker"></span> %s</div>',
    318                 __( 'Inactive', 'digital-license-manager' )
     318                __( 'Disabled', 'digital-license-manager' )
    319319            );
    320320        } else {
    321321            $html = sprintf(
    322322                '<div class="dlm-status dlm-status-delivered"><span class="dashicons dashicons-marker"></span> %s</div>',
    323                 __( 'Active', 'digital-license-manager' )
     323                __( 'Enabled', 'digital-license-manager' )
    324324            );
    325325        }
     
    451451    private function isViewFilterActive() {
    452452        if ( array_key_exists( 'status', $_GET )
    453              && in_array( $_GET['status'], array( 'active', 'inactive' ) )
     453             && in_array( $_GET['status'], array( 'enabled', 'disabled' ) )
    454454        ) {
    455455            return true;
     
    469469        $current     = ! empty( $_REQUEST['status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ) : 'all';
    470470
    471         $total_active   = $this->getRecordsCount( 'active' );
    472         $total_inactive = $this->getRecordsCount( 'inactive' );
     471        $total_active   = $this->getRecordsCount( 'enabled' );
     472        $total_inactive = $this->getRecordsCount( 'disabled' );
     473
    473474
    474475        // All link
     
    483484        );
    484485
    485         // Active link
    486         $class                 = $current == 'active' ? ' class="current"' : '';
    487         $activeUrl             = esc_url( add_query_arg( 'status', 'active' ) );
    488         $statusLinks['active'] = sprintf(
     486        // Enabled link
     487        $class                 = $current == 'enabled' ? ' class="current"' : '';
     488        $activeUrl             = esc_url( add_query_arg( 'status', 'enabled' ) );
     489        $statusLinks['enabled'] = sprintf(
    489490            '<a href="%s" %s>%s <span class="count">(%d)</span></a>',
    490491            $activeUrl,
    491492            $class,
    492             __( 'Active', 'digital-license-manager' ),
     493            __( 'Enabled', 'digital-license-manager' ),
    493494            $total_active
    494495        );
    495496
    496         // Inactive link
    497         $class                   = $current == 'inactive' ? ' class="current"' : '';
    498         $inactiveUrl             = esc_url( add_query_arg( 'status', 'inactive' ) );
    499         $statusLinks['inactive'] = sprintf(
     497        // Disabled link
     498        $class                   = $current == 'disabled' ? ' class="current"' : '';
     499        $inactiveUrl             = esc_url( add_query_arg( 'status', 'disabled' ) );
     500        $statusLinks['disabled'] = sprintf(
    500501            '<a href="%s" %s>%s <span class="count">(%d)</span></a>',
    501502            $inactiveUrl,
    502503            $class,
    503             __( 'Inactive', 'digital-license-manager' ),
     504            __( 'Disabled', 'digital-license-manager' ),
    504505            $total_inactive
    505506        );
     
    625626        $this->processBulkActions();
    626627
    627         $perPage     = $this->get_items_per_page( 'activations_per_page', 10 );
     628        $perPage     = $this->get_items_per_page( 'dlm_activations_per_page', 10 );
    628629        $currentPage = $this->get_pagenum();
    629630        $totalItems  = $this->getRecordsCount();
  • digital-license-manager/trunk/readme.txt

    r3315067 r3318616  
    55Requires PHP: 7.0
    66Tested up to: 6.8
    7 Stable tag: 1.8.1
     7Stable tag: 1.8.2
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    208208
    209209== Changelog ==
     210
     211
     212= 1.8.2 =
     213*Release date - 27 Jun 2025*
     214
     215* Fix Active license status showing as Inactive in My Account
     216* Fix count of License Activations in Activations table in Admin
     217* Fix License Activations table view filters
    210218
    211219= 1.8.1 =
  • digital-license-manager/trunk/vendor/composer/installed.php

    r3315067 r3318616  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'df4ff9edac66d38ecd7951a6cf7da22cf60caa8f',
     6        'reference' => '8a625a0a8ed26f889d7632240683b379ba113eca',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-master',
    2424            'version' => 'dev-master',
    25             'reference' => 'df4ff9edac66d38ecd7951a6cf7da22cf60caa8f',
     25            'reference' => '8a625a0a8ed26f889d7632240683b379ba113eca',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.