Skip to content

Instantly share code, notes, and snippets.

@gdarko
Created May 23, 2023 06:55
Show Gist options
  • Save gdarko/5d6d8859037ba2f3281e062688d680c4 to your computer and use it in GitHub Desktop.
Save gdarko/5d6d8859037ba2f3281e062688d680c4 to your computer and use it in GitHub Desktop.
Simple plugin to disable the software parameter in the REST API activate endpoint when using Digital License Manager Pro
<?php
/**
* Plugin Name: DLM Disable Software from REST API
* Description: Sample plugin that disables software requirement for software parameter in activate endpoint in the rest api.
* Author: Darko Gjorgjijoski
* Version: 1.0.0
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
return;
}
class DLM_Pro_RESTAPI_Disable_Software {
/**
* Constructor
*/
public function __construct() {
add_filter('dlm_rest_api_license_activation_require_software_param', '__return_false');
}
}
new DLM_Pro_RESTAPI_Disable_Software();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment