Giter Site home page Giter Site logo

gdarko / digital-license-manager Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 5.0 1.67 MB

Extendable License Manager for WordPress and WooCommerce πŸ”‘

License: GNU General Public License v3.0

CSS 2.37% JavaScript 5.13% PHP 90.46% HTML 0.74% Shell 1.17% SCSS 0.12%
licensing licensing-server php woocommerce wordpress

digital-license-manager's People

Contributors

gdarko avatar pondermatic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

digital-license-manager's Issues

Feature suggestion

Hi i think it would be a good feature to add the variable product support
Like you would be able to sell license with different options using only a single product
For example if you have different options of a single type of product

Using digital license manager without woo

Hi there, just checking out your plugin. I see it says 'Compatible with WooCommerce for selling licenses but also works without it.' but there seems to be no information as to how to use it without WooCommerce. Is that with the Pro Version and your software manager? Or is that with any cpt, or via the rest api. Any specific place to start digging? Thanks

Generator with expiry date doesnt seem to propagate to sold licenses

Hey, I wanted to thank you for this great tool! I however ran across something which im unsure of.

I have a generator for a trial version which has a 14 day expiry period which is attached to an item on woocommerce to automatically generate licenses. However, when these licenses are generated they are set to expire at "Never".

From what I can tell this isnt something explicit to the pro version and is perhaps a bug? This is on version 1.6.1.

Add query parameters to the licenses endpoint

From Imber Development:

It would be amazing to have product_id, user_id, and order_id parameters in the /wp-json/dlm/v1/licenses endpoint. This would make finding a license key by product id or user id a lot easier than going through all keys and manually sorting them.

AbstractResourceRepository::delete() prepare

AbstractResourceRepository::delete() calls $wpdb->prepare() with an already prepared query, via AbstractResourceRepository::sqlINValues() and no placeholders. This causes wpdb::prepare() to log a "doing it wrong" warning.

I can think of two different solutions to fix this issue.

  1. replace
    $sqlQuery = $wpdb->prepare( "DELETE FROM {$this->table} WHERE {$this->primaryKey} IN (" . $ids . ")" );
    with
    $sqlQuery = "DELETE FROM {$this->table} WHERE {$this->primaryKey} IN ($ids)";
  2. replace
    $ids      = implode( ',', array_map( array( $this, 'sqlINValues' ), $ids ) );
    $sqlQuery = $wpdb->prepare( "DELETE FROM {$this->table} WHERE {$this->primaryKey} IN (" . $ids . ")" );
    with
    $sqlQuery = $wpdb->prepare(
    	"DELETE FROM {$this->table} WHERE {$this->primaryKey} IN ($placeholders)",
    	$ids
    );

If this were not a WordPress plugin, I would choose solution 1, but since WordPress strongly encourages using core APIs, solution 2 is recommended.

@gdarko, let me know if you want me to submit a pull request to fix this issue.

Dates displayed inconsistently

@gdarko,

Issue

The expiration date/time is displayed inconsistently, which can be confusing.

Example

When wp_dlm_licenses.expires_at = '2023-08-15 04:00:00.0' and

  • get_option( 'gmt_offset' ) = '-5.0'
  • get_option( 'date_format' ) = 'F j, Y'
  • get_option( 'time_format' ) = 'g:i a'

These pages display:

Page Display
License Manager -> Licenses August 14, 2022
License Manager -> Licenses -> Edit license 2022-08-15
My account -> Orders -> View August 15, 2023
My account -> Licenses August 14, 2023
My account -> Licenses -> View August 14, 2023

Options

  1. Always display the date relative to UTC. This is consistent but vague.
    August 15, 2023
  2. Display the "UTC" timezone abbreviation. Showing the timezone without the time is unusual.
    August 15, 2023, UTC
  3. Display the local timezone abbreviation. Showing the timezone without the time is unusual.
    August 15, 2023, CDT
  4. Display the time and the local timezone abbreviation. This is my preferred option.
    August 15, 2023, 2:00 am CDT
  5. Display the time and the local timezone identifier. This is lengthy but is the clearest because people in other countries may not be familiar with the local timezone abbreviation.
    August 15, 2023, 2:00 am America/Chicago

Proposed Solution 1

  • The expiration date must always be shown as "$date, $time $timezone".
  • The date format must use the WordPress 'date_format' option.
  • The time format must use the WordPress 'time_format' option.
  • Since WordPress doesn't have a 'timezone_format' option:
    1. DLM should default to ' T' and run it through apply_filter(), or
    2. add a 'dlm_timezone_format' option in the "License Manager -> Settings -> General" page with a link to the WordPress documentation on date and time formatting.

Proposed Solution 2

An alternative solution is to add a 'dlm_expiration_format' option to the "License Manager -> Settings -> General" page with a link to the WordPress documentation on date and time formatting and let users set the entire format.

An extra nice feature would be to allow the user to specify the current WordPress date and time formats using merge codes like {{DATE_FORMAT}}, {{TIME_FORMAT}} T.

PR

If this sounds good, I would be happy to submit a pull request with either solution.

Issue with REST API GET /licenses

The endpoint does not work if you add your consumer key and secret as parameters.

image

Caused by that line of code as it tries to use the parameters for the query.

Also, it responds with no results for your query if you try to use parameters per_page and page, only parameters like order_id work.

Documentation for HTTP basic auth is incorrect
image

Header name: Authentication -> Authorization
Header value: Bearer -> Basic

Shortcodes for license check

Just an idea for your License manager.
Could a form be placed on a page via shortcode to see if a license is valid or not, that anyone can check. Better still, have a button in the user account area, so the owner can report a license as stolen, or select from a list of configurable status's created in admin.
Redirect to a new page after licence valid status showing some of the owners details from meta. Or, if reported as stolen, redirect to another page to report it.
Just a couple of possible additions to your plugin which would be really useful to our needs,
Thanks
Dave

Handle deleting relations

Deleting License

  • Prevent if it is activated

Deleting Activation

  • Set activation_id = NULL in Licenses

Warning: Undefined array key "classes"

Hello iam getting this error in my account

Warning: Undefined array key "classes" in /wp-content/plugins/digital-license-manager/templates/woocommerce/dlm/my-account/licenses/partials/table-activations-row-actions.php on line 38

Warning: Undefined array key "disabled" in /wp-content/plugins/digital-license-manager/templates/woocommerce/dlm/my-account/licenses/partials/table-activations-row-actions.php on line 58

error

Auto delivery

Hi , i installed and tried the plugin but when i tried it , it does not deliver the license one the automatic mode and i have to use the status mode to deliver the license

Issue with Special Characters

Hello,

I’ve encountered an issue while utilizing your plugin’s REST API endpoints, specifically when interacting with the β€œ/licenses/{license_key}” endpoints. It appears that when the {license_key} contains certain special characters such as β€˜@’, β€˜/’, or others, it disrupts the API request flow, leading to an unexpected error:

{
  code: 'rest_no_route',
  message: 'No route was found matching the URL and request method.',
  data: { status: 404 }
}

Steps to Reproduce:

Use a {license_key} containing special characters like β€˜@’, β€˜/’, etc.
Make a request to any of the β€œlicenses/{license_key}” endpoints via the REST API.

Expected Behavior:

The API should be able to process requests with {license_key} values containing special characters without encountering routing or handling issues.

Additional Notes:

I attempted to address this by using encodeURIComponent() to encode the special characters within the {license_key} before making the request. However, the issue persisted.

API list endpoint does not work anymore

The list endpoint just returns the following error:

{
    "code": "data_error",
    "message": "No licence keys found for your query.",
    "data": {
        "code": 404
    }
}

The API keys are correct and there are license keys.

Show product variation info on the Checkout and on Orders page

Hi, first of all thank you for this great product. I'm using it successfully, but it would be wonderful if it could show the variation details of licenses after a checkout.

For example I have "My cool product" with two different variations. If I order two variations it's indistinguishable which license key is associated to which variation.

image

Remove jQuery reliance completely

In 2023 almost everything that jQuery does can be done with Javascript. This issue will keep track of the progress of removing jQuery form the plugin completely.

  • Create Native/Vanilla JS HTTP client
  • Replace jQuery.ajax calls with the native JS HTTP client
  • Replace select2 with Tom-select or other vanilla js select element
  • Rewrite scripts that are used for the generators, licenses and the general admin interface

Attempts to steal our code

What is going on

Unfortunately the new developer of License Manager for WooCommerce plugin decided to illegally steal our code and incorporate it into their plugin License Manager for WooCommerce. There are two attempts so far by the team behind License Manager for WooCommerce to publish a new version with our code while removing copyrights and not attributing at all.

First back in August 2023 when they published 2.3-beta and now again in November with version 3.0+.
All attempts are reported and recorded. I am sorry that this happens but we aim to protect our IP rights.

Don't get me wrong, we have no issues with proper forking. But our indications tell something different, apparently they started to see the traction and the impact of our plugin and want to suppress it by stealing our code.

How Digital License Manager started

Initially we forked License Manager for WooCommerce because Drazen Bebic, the original author abandoned it before he sold the plugin to the current team behind. I am sure you remember that there were no updates for around a year before he let it go.

To give some more context. I used License Manager for WooCommerce and contributed to the project with code, i am one of the early adopters of License Manager for WooCommerce.

What changed in LMFWC after the takeover

Most likely nothing valuable. The plugin is still abandoned even after the takeover by the new team. If you see the big picture, there are no features so far, the only added "feature" is the malicious Freemius addon. No HPOS support yet, PHP warnings remain, all the old problems remain like stock synchronization, etc. Now in 3.0+ as gratis to their beloved users they introduced a lot more issues by incorrectly stealing our code.

Only "compatibility checks" with WooCommerce and WordPress that increments its version. Oh and they reorganized the menu.

Continued development of Digital License Manager

In meanwhile, we rewrote our Digital License Manager plugin from scratch. There is not a lot left from the old License Manager for WooCommerce. The code we choose to keep properly attributes and restores copyright to the original owner (See example).

We updated the database structure, made Activations in separate table, added HPOS support, rewrote and separated the business logic, rewrote the Rest API, introduced Gutenberg blocks, created PDF Certificates feature, Ditched jQuery, developed migration tools that allows you to migrate from LMFWC and a lot more cool stuff.

Also we created WooCommerce Subscriptions support in the Pro version. Many new features are in the pipeline, like Reports.

Why this DRAMA

Because, it probably makes sense to steal our code in the most illegal way possible. Our code is nice and clean, well tested with unit tests. We have a lot more features and much better database organization. They have no clear path about future development. The only goal is to milk more money from their plugin with 6k+ active installs obtained on old glory.
In this case, it really makes sense to pass it unnoticed on WP.org plugin repository, but here they failed.

Besides that, they are also targeting our WooCommerce Subscriptions support feature in their premium version as well because once you have large chunks of the free version of Digital License Manager, you can easily adopt that feature.

How to migrate to Digital License Manager

If you are interested to migrate your data to Digital License Manager, read more here:

Migrate from License Manager for WooCommerce


I will keep this thread updated


Updates

  • [2024-11-24] WordPress development trac showing that they are making 3.0.4 update and the only change here is obfuscated code of ours (or maybe better-said "reformatted") to show some differences and partially restored copyright. A lot of stolen code and features remains unattributed and most copyright notices does show all the required information.
  • [2024-11-26] License Manager for WooCommerce plugin is reinstated on the WP.org repository, however, in the current form it still breaks the copyright laws and not all code is attributed.
  • [2024-11-27] License Manager for WooCommerce team is trying their best to get away with stolen and partially attributed code, however one should be aware that this is still illegal. In meanwhile, we released an Digital License Manager v1.5.5 update that improves the migration from License Manager for WooCommerce to Digital License Manager.
  • [2024-11-28] They send company's executive to spam the comment section in this thread, pretending that he is regular user of the license plugin.
  • [2024-11-29] They are trying to obtain access to our PRO version through our website. Their goal is to steal our premium features.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.